Welcome Guest | Login

Gem install permission denied

my application (sub) requires the ruby gem: 'fastercsv'
i followed the freeze gem tutorial and unpacked the gem in my vendors/plugins folder.
When I run

[~/sub/public]# ruby dispatch.fcgi

i get this error:

/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:379:in `report_activate_error': Could not find RubyGem fastercsv (>= 0) (Gem::LoadError)
       from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:311:in `activate'
       from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:65:in `active_gem_with_options'
       from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:50:in `gem'
       from ./../config/environment.rb:63
       from dispatch.fcgi:21:in `require'
       from dispatch.fcgi:21

when i go into my application directory and type:

ampzus@ampz.us [~/sub/public]# gem install fastercsv

i get:

ERROR:  While executing gem ... (Errno::EACCES)
   Permission denied - /usr/local/lib/ruby/gems/1.8/cache/fastercsv-1.2.3.gem

2008-03-20 08:51 AM

Hello,

You can try adding the following lines in environment.rb
----
require 'rubygems'
gem 'fastercsv'
----
After adding these lines ..do restart your rails app and see if this does the trick or not.

2008-03-20 09:53 AM

Regards,
Rahul
what do you mean by restart my rails app? how would i do this?

do you mean doing:

[~]# killall dispatch.fcgi

i get a (no processes killed) when doing that

----
require 'rubygems'
gem 'fastercsv'
----

is already in my code...i still don't know what to do

2008-03-21 07:03 AM

Ok.. Yup, by restart I meant killing the running dispatch.fcgi and accessing the URL (which reflects your app) to fire up your fcgi process again.. This is equivalent to a application restart

Also if you are running your app on mongrel then running the mongrel_rails 'restart' command at your apps root directory..

Also I have installed the gem fastercsv-1.2.3 on the server now.

You should not be facing the issue currently..Do check and let us know the status..

2008-03-21 07:32 AM

Regards,
Rahul
It is working great now. Thank you so much! Now it's time to get dirty with my app =P

2008-03-22 04:17 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.