我正在使用 rails 2.3.5 , ruby 1.8.7-p302 并且我正在尝试安装设计,因此我已将 gem 'devise' 添加到我的 Gemfile 中,然后捆绑安装工作正常,然后我尝试编写脚本/生成设计:安装但是它失败了,我不知道这是什么原因
bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies.......
Using rake (0.8.7)
Using activesupport (2.3.5)
Using rack (1.0.1)
Using actionpack (2.3.5)
Using actionmailer (2.3.5)
Using activerecord (2.3.5)
Using activeresource (2.3.5)
Installing bcrypt-ruby (3.1.1)
Installing orm_adapter (0.0.7)
Installing warden (1.2.3)
Installing devise (1.5.4)
Using rails (2.3.5)
Using simple_form (1.4.1)
Using sqlite3 (1.3.8)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
➜ Hostels script/generate devise:install
/home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require': no such file to load -- rails (MissingSourceFile)
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/devise-1.5.4/lib/devise.rb:1
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `require'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/dexter/Desktop item/Hostels/config/boot.rb:115:in `load_gems'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:164:in `process'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
from /home/dexter/Desktop item/Hostels/config/environment.rb:9
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/commands/generate.rb:1:in `require'
from /home/dexter/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/commands/generate.rb:1
from script/generate:3:in `require'
from script/generate:3
那是我的 Gemfile
source 'https://rubygems.org'
gem 'rails', '2.3.5'
gem 'rake','0.8.7'
gem 'sqlite3'
gem 'simple_form'
gem 'devise'
# bundler requires these gems in all environments
# gem 'nokogiri', '1.4.2'
# gem 'geokit'
group :development do
# bundler requires these gems in development
# gem 'rails-footnotes'
end
group :test do
# bundler requires these gems while running tests
# gem 'rspec'
# gem 'faker'
end