gpt4 book ai didi

ruby-on-rails - 缺少 Rails 2.3.11 gem。请 `gem install -v=2.3.11 rails` ,

转载 作者:行者123 更新时间:2023-12-04 19:04:25 24 4
gpt4 key购买 nike

我在 ubuntu 11.04 上安装 rails 时遇到问题,不确定问题出在哪里……我刚刚在生产中安装了 rails、passenger 和 rvm,一切看起来都还可以,但由于某种原因,我一直在收到

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

这里是 link

当我在申请时
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)

所以它没有意义发生了什么以及为什么它告诉我我没有安装 rails ......关于我做错了什么的任何想法

这是我的 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

更新环境.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'

最佳答案

可能是您的乘客根本没有使用 RVM 环境。为了开箱即用,您需要

  • 让您的应用程序在 ubuntu 下运行用户(默认情况下它不这样做,默认情况下它使用网络服务器用户 www-data)并设置适当的默认值,以便使用正确的 ruby​​ 和 gemset,或使用
  • 为 RVM 设置完整的乘客集成。见 http://beginrescueend.com/integration/passenger/了解更多信息。

  • 请注意,乘客一次只能使用一颗 ruby 。虽然您可以在单个乘客实例中在同一个 ruby​​ 上使用不同的 gemset(例如 fpr 多个应用程序),但您不能在 rubies 之间切换。

    关于ruby-on-rails - 缺少 Rails 2.3.11 gem。请 `gem install -v=2.3.11 rails` ,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8203126/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com