启动rails 3应用程序时出错

时间:2011-10-23 22:50:41

标签: ruby-on-rails ruby ruby-on-rails-3

当我尝试启动rails 3应用程序时,我收到以下错误。它已经运行了好几个月,然后我想停下来再次开始进行更改,现在我收到以下错误:

[root@Web01 script]# rails server -e production
/usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find activesupport (= 3.1.1) amongst [ZenTest-4.6.2, ZenTest-4.4.2, abstract-1.0.0, actionmailer-3.1.1, actionmailer-3.0.7, actionpack-3.1.1, actionpack-3.0.7, actionpack-2.3.10, activemodel-3.1.1, activemodel-3.0.7, activerecord-3.1.1, activerecord-3.0.7, activerecord-2.3.10, activeresource-3.1.1, activeresource-3.0.7, activesupport-3.0.7, activesupport-2.3.10, apn_on_rails-0.4.2, arel-2.2.1, arel-2.0.9, autotest-4.4.6, builder-3.0.0, builder-2.1.2, bundle-0.0.1, bundler-1.0.15, configatron-2.8.2, configatron-2.6.4, crack-0.1.8, daemon_controller-0.2.6, daemons-1.1.4, diff-lcs-1.1.2, erubis-2.7.0, erubis-2.6.6, fastthread-1.0.7, git-1.2.5, hike-1.2.1, httparty-0.7.8, i18n-0.5.0, jeweler-1.5.2, json-1.6.1, kgio-2.5.0, mail-2.3.0, mail-2.2.17, memcache-client-1.8.5, mime-types-1.16, multi_json-1.0.3, mysql2-0.2.1, passenger-3.0.7, polyglot-0.3.1, rack-1.3.4, rack-1.2.2, rack-1.1.0, rack-cache-1.1, rack-mount-0.8.3, rack-mount-0.6.14, rack-ssl-1.3.2, rack-test-0.6.1, rack-test-0.5.7, rails-3.1.1, rails-3.0.7, railties-3.1.1, railties-3.0.7, raindrops-0.7.0, rake-0.8.7, rb-readline-0.4.0, rcov-0.9.9, rdoc-3.10, rmagick-2.13.1, rspec-2.4.0, rspec-core-2.4.0, rspec-expectations-2.4.0, rspec-mocks-2.4.0, rubygems-update-1.8.11, sprockets-2.0.2, thor-0.14.6, tilt-1.3.3, treetop-1.4.9, tzinfo-0.3.30, tzinfo-0.3.26, unicorn-4.1.1, unicorn-4.0.1, yamler-0.1.0] (Gem::LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:761:in `activate_dependencies'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:758:in `each'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:758:in `activate_dependencies'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:742:in `activate'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:1211:in `gem'
from /usr/local/bin/rails:18

关于该做什么的任何想法?

修改

这是Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.0.7'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'mysql2' ,'0.2.1'

gem 'rmagick'

gem 'memcache-client'

gem 'apn_on_rails', :git => 'https://github.com/natescherer/apn_on_rails.git', :branch => 'rails3'

gem 'daemons'

gem 'httparty'
gem "rake", "0.8.7"
gem "rack", "1.3.4"

gem 'tzinfo', '0.3.26'
gem 'mail', '2.2.17'
gem 'arel', '2.0.9'
gem 'unicorn'

gem 'rb-readline'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end

我不确定bundle install是什么,我对rails很新。

3 个答案:

答案 0 :(得分:1)

确保在控制台中安装了捆绑包:

$ bundle install

似乎您的应用程序无法使用activesupport依赖项。

答案 1 :(得分:0)

首先运行bundle update,然后运行bundle install

答案 2 :(得分:0)

如果您在捆绑安装中遇到任何错误,请检查是否与特定gem /版本存在任何冲突。

访问此网站http://rubygems.org/并检查是否需要任何依赖项和版本。

我认为你的宝石文件也是旧的,因为它缺少两个jQuery广告原型宝石(我相信你正在使用其中任何一个)

相关问题