简体   繁体   English

缺少Rails 2.3.11宝石。 请`gem install -v = 2.3.11 rails`,

[英]Missing the Rails 2.3.11 gem. Please `gem install -v=2.3.11 rails`,

I am having a problem with my rails install on ubuntu 11.04 and not sure what the problem is ...i just installed rails and passenger and rvm on production and all seems ok but for some reason i keep getting 我在ubuntu 11.04上使用rails安装时出现问题并且不确定问题是什么...我刚刚在生产中安装了rails和passenger和rvm并且一切似乎都没问题但是由于某些原因我不断得到

Missing the Rails 2.3.11 gem. Please `gem install -v=2.3.11 rails`,

Here is the link 这是链接

when i am on the application and i do 当我在申请时,我做

gem list

*** LOCAL GEMS ***

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
bundler (1.0.21)
rack (1.1.2)
rails (2.3.11)
rake (0.9.2.2)

so it doesnt make sense what is going on and why its telling me that i dont have rails installed...any ideas on what im doing wrong 所以它没有意义发生了什么,为什么它告诉我,我没有安装导轨...任何关于我做错的想法

Here is my rvm info 这是我的rvm信息

rvm list

rvm rubies

gem install -v=2.3.11 rails
Fetching: rake-0.9.2.2.gem (100%)
Fetching: activesupport-2.3.11.gem (100%)
Fetching: activerecord-2.3.11.gem (100%)
Fetching: rack-1.1.2.gem (100%)
Fetching: actionpack-2.3.11.gem (100%)
Fetching: actionmailer-2.3.11.gem (100%)
Fetching: activeresource-2.3.11.gem (100%)
Fetching: rails-2.3.11.gem (100%)
Successfully installed rake-0.9.2.2
Successfully installed activesupport-2.3.11
Successfully installed activerecord-2.3.11
Successfully installed rack-1.1.2
Successfully installed actionpack-2.3.11
Successfully installed actionmailer-2.3.11
Successfully installed activeresource-2.3.11
Successfully installed rails-2.3.11
8 gems installed
Installing ri documentation for rake-0.9.2.2...



=> ruby-1.8.7-p334 [ x86_64 ]
   ruby-1.9.2-p290 [ x86_64 ]


rvm gemset list

gemsets for ruby-1.8.7-p334 (found in /home/ubuntu/.rvm/gems/ruby-1.8.7-p334)
   global
=> ticket_mule

UPDATE environment.rb 更新环境.rb

RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION


Rails::Initializer.run do |config|


  # Specify gems that this application depends on and have them installed with rake gems:install
  # config.gem "bj"
  # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
  # config.gem "sqlite3-ruby", :lib => "sqlite3"
  # config.gem "aws-s3", :lib => "aws/s3"
  config.gem 'will_paginate'
  config.gem 'authlogic'
  config.gem 'searchlogic'
  config.gem 'paperclip'
  config.gem 'prawn'
  config.gem 'populator'
  config.gem 'faker'

That's rather famous problem linked with rack . 这是与rack相关的相当着名的问题。 Please see this article for possible solution your issue. 请参阅此文章以了解您的问题。 There is one more article about it, but unfortunately it was written on russian. 还有一篇关于它的文章 ,但不幸的是它是用俄语写的。

It could be that your passenger is not using the RVM environment at all. 可能是您的乘客根本没有使用RVM环境。 For that to work out of the box, you need to 为了开箱即用,你需要

  • have your app run under the ubuntu user (which it doesn't do by default, it uses the webserver user www-data by default) and setting proper defaults so that the correct ruby and gemset is used RVM, or to 让你的应用程序在ubuntu用户下运行(默认情况下不会这样做,它默认使用webserver用户www-data )并设置正确的默认值,以便使用正确的ruby和gemset RVM,或者
  • set up full passenger integration for RVM. 为RVM建立全客运集成。 See http://beginrescueend.com/integration/passenger/ for more info about that. 有关详细信息,请参阅http://beginrescueend.com/integration/passenger/

Note that passenger can only use exactly one ruby at a time. 请注意,乘客一次只能使用一颗红宝石。 While you can use different gemsets on the same ruby in a single passenger instance (eg fpr multiple applications), you can not switch between rubies. 虽然您可以在单个乘客实例中使用相同红宝石上的不同gemset(例如fpr多个应用程序),但您无法在红宝石之间切换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM