I've been trying to help a developer in my company who was having trouble installing gems via the command gem install for example gem install cucumber. The problem seems to be proxy related in that the ruby program/command prompt (I don't pretend do know what it is) cannot get out through the proxy. We set the variables for a proxy bypass we have but it simply doesn't work.
We have a direct internet connection available for testing and when the PC was connected to that, the gem install completed just fine, confirming our firewall suspicions.
Our security team won't simply allow a program or PC to access whatever it wants on the Internet, and for other programs an exclusion is made for the IP address the program wants to connect to. I'm of the understanding that ruby gems may connect to a number of different IP addresses in order to download and install gems.
Does anyone know, or is it possible for me to find out all the possible IP addresses that installing gems may require?
If any of this sounds like a bad request, it's just my lack of understanding around ruby gems, installing gems etc. Hopefully you get the idea.
Thanks.
Related
Can anyone help me installing ruby and jekyll packages in linux host under an application account without root access?
If you want to install ruby on a server where you only have a user account and no root privileges, you can build it from source. RVM is a tool that can help with this, that can be installed locally. You may run into issues with missing tools (like a compiler) or dependencies. Depending on what is missing, you may be able to upload it to your user directory some where and continue trying to build ruby. How much work this will be depends on how much is already present on this host.
Although, I will go a bit further and say, if you're planning to use jekyll to generate a static site and server the pages from this linux host, it's probably going to be easier to install ruby and jekyll locally and generate the static site from your development computer, and just upload the results to the server.
After having a fairly stable chef installation for I don't know how long, this has started popping up when trying to upload our deploy cookbook, after making a very simple change to it (changing an IP address attribute string to another IP address).
After hopping onto the chef server, indeed `/usr/lib/ruby/vendor_ruby/chef/checksum_cache.rb' isn't available, as it's not there. I've done a fair bit of googling around for 'checksum_cache.rb' and 'Chef::ChecksumCache' but have come up with near enough no proper information, nor how to solve it.
Standard chef installation on a Ubuntu EC2 box, running
chef-server --version
gives me
Chef Server (API) Version: 10.18.2
Any help is extremely appreciated as this is obviously completely blocking our auto deployments.
To summarize from IRC, the file just needed to be restored manually from a copy of the package. Possibly disk corruption at work.
Also for the record, the distro packages for Chef and Chef Server should never be used.
I am using the guard-laravel package on my project in the hope of using sass. Unfortunately, I am also using vagrant for my development environment which uses Vitualbox shares to mount my web sites folders to the VM- I say unfortunately because it appears that changes to the virtualbox shared folders are not picked up by the listen rubygem.
This, I believe, leaves me with two options:
1) Use samba to share folders - this is an option, but I suspect it may be a bit of a pain to get vagrant/chef to play nicely
or
2) force the listen rubygem into polling mode, now I have read that I can pass this in as a flag but since I am not manually launching the listen gem I dont know how I can do this.
Can anyone suggest how I might force the gem to always go into polling mode or if you know another way to make the listen gem watch my shared folders then that would be equally wonderful if not wonderfullier.
What's the simplest way -- ideally a single click -- to set up a ruby (not rails) runtime environment on a local Windows system (not a web site), with specific gems?
I have code for a customer that runs on their local system. I've been sending them ocra executables, and that sorta, kinda, usually works, but is showing more problems all the time.
So I want to set up a native ruby environment there -- actually I want them to set it up -- so I can just send straight ruby code. But it's got to have the specific gems I use (FxRuby, several others).
Most important, it's gotta be dead simple for them -- ideally a single click. I'm trying to avoid a physical trip to their site.
Thanks.
As they are running Windows why not go to the ruby-lang.org website and download the windows installer - depending on the edition they do come with gems - some with FXRuby (which I use myself) you can then send the app to them and they can install Ruby - It is quiite simple to do.
In the ruby code before you make it an ocra file put
`gem install mygem`
`gem install myothergem`
in backsticks...
This will run in the command line of the receiving computer. Then require the gems later in your script.
Let me know if this works.
I love RVM. I realize that the main use case for it is letting different users switch between different versions of Ruby. But let's say I'm deploying a Rails app to a server and I just want a single version of Ruby running. In particular, I want 1.9.2, which is a breeze to install with RVM but a pain without it. Is there a way that I can say "I want this to be the canonical Ruby installation for all users" (along with all of its gems) without having to create a bunch of symlinks by hand and change them every time I update to a newer Ruby release?
Install RVM as root and do a sudo rvm use 1.9.2 --default. Any user sourcing /usr/local/rvm/scripts/rvm will per default have 1.9.2.
I know this doesn't quite answer your question, but:
I ran into several problems with installing RVM globally and resorted to using one user account for deployment and for all Ruby / Rails processes -- that users account exists on all dev and production servers, and the .rvm directory is rsync'ed from one dev-server to all other servers.
How many different users on your App servers do really need to access Ruby 1.9.2?
Can't you just trim that down to just one user? That worked best for me.
Note:
One thing you probably want to avoid is to install RVM on your app server(s) manually and then install Ruby and Gems on the app server ... you don't want to keep tools like cc lying around on your production servers for security reasons! rsync'ing the .rvm directory is far safer! and the result is far more consistent!