乘客中丢失的宝石
我的 Rails 2.3.8 应用程序无法启动,因为缺少 gem:Friendly_id。我收到以下错误消息:
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.
其中 development
是我运行该应用程序的用户。
我发现在本地 /usr/lib/ruby/gems/1.8/gems
中,我可以使用 sudo gem installFriendly_id
命令将 gem 安装到此目录中。
但我注意到,在 Passenger 从以下位置检索 gem 的路径中: /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems
没有 Friendly_id
宝石。不过,如果没有 sudo,我就无法运行该命令。
现在我知道我必须将 Friendly_id
gem 安装到 /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems
目录中,但是我不知道怎么办。
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我设法使用以下命令将丢失的 gem 安装到所需的目录中:
I managed to install missing gem into the required directory using this command: