Ruby on Rails Friday, January 18, 2013

You are using Debian-MRI (Debian-Ruby) you need to sudo before running
gem install. If you want to install as a normal user use RVM or
Chgems/Chruby. The hint was: "ERROR: While executing gem ...
(Gem::FilePermissionError)" based on the username I'm going to also
assume you are on AWS, which means you can sudo without a password
too, so you are all good to go, just do sudo before your gem install
and come back with any other errors if you get them after you sudo.

On Fri, Jan 18, 2013 at 3:27 AM, Mohnish J. <lists@ruby-forum.com> wrote:
> Hello,
>
> I'm trying to setup the gem environment for my app on prod. Apparently,
> I got to know that RVM is not recommended to be used in prod env. So,
> I'm doing a non RVM setup.
>
> I'm on Ruby 1.9.3 and Rails 3.0.11.
>
> When I run the "`gem env`" cmd from the terminal I get the below
> details. Please note, here it shows my Ruby version as Ruby 1.8.7
>
>
> ubuntu@ip:/var/lib/gems$ gem env
> RubyGems Environment:
> - RUBYGEMS VERSION: 1.8.15
> - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
> - INSTALLATION DIRECTORY: /var/lib/gems/1.8
> - RUBY EXECUTABLE: /usr/bin/ruby1.8
> - EXECUTABLE DIRECTORY: /usr/local/bin
> - RUBYGEMS PLATFORMS:
> - ruby
> - x86_64-linux
> - GEM PATHS:
> - /var/lib/gems/1.8
> - /home/ubuntu/.gem/ruby/1.8
> - GEM CONFIGURATION:
> - :update_sources => true
> - :verbose => true
> - :benchmark => false
> - :backtrace => false
> - :bulk_threshold => 1000
> - REMOTE SOURCES:
> - http://rubygems.org/
>
> **Whereas**,
>
> on running "`ruby -v`" from the same terminal window, I get:-
>
> ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
>
> Now, when I do a bundle install, I get the error:-
>
>
> Gem::InstallError: em-synchrony requires Ruby version >= 1.9.
> An error occurred while installing em-synchrony (0.2.0), and Bundler
> cannot continue.
> Make sure that `gem install em-synchrony -v '0.2.0'` succeeds before
> bundling.
>
>
> Now, when I try to install this gem separately using **gem install**, I
> face the following roadblock:-
>
> ubuntu@ip:/var/lib/gems$ gem install em-synchrony -v '0.2.0'
> ERROR: While executing gem ... (Gem::FilePermissionError)
> You don't have write permissions into the /var/lib/gems/1.8
> directory.
>
> ubuntu@ip:/var/lib/gems$ sudo gem install em-synchrony -v '0.2.0'
> ERROR: Error installing em-synchrony:
> em-synchrony requires Ruby version >= 1.9.
>
> I know for sure somewhere the Ruby version mismatch as mentioned above,
> has something to do with this. But I'm not sure how exactly I can get
> over this. Any ideas on what I need to do fix this ?
>
> Thanks
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment