开发者

Missing Gem in Passenger

My Rails 2.3.8 app couldn't startup because of a missing gem: friendly_id. I got the following error message:

Missing these required gems: friendly_id ~> 3.2.1 You're running: ruby 1.8.7.253 at /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby rubygems 1.3.7 at /home/development/.gem/ruby/1.8, /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8 Run `rake gems:install` to install the missing gems. 

where development is the user I am running the app.

I found that in my local /usr/lib/ruby/gems/1.8/gems I was able to install the gem into this directory using the sudo gem install friendly_id command.

But I noticed that in the path for Passenger to retrieve the gem from: /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems does not have the friendly_id gem. I couldn't run the command without sudo though.

Now I know I gotta install the friendly_id gem into the /opt/ruby-enterprise-1.8.7-2010.02/lib开发者_开发百科/ruby/gems/1.8/gems directory, but I couldn't figure out how.

Thanks.


I managed to install missing gem into the required directory using this command:

sudo /opt/ruby-enterprise-1.8.7-2010.02/bin/gem install <<<gem-name-here>>>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜