Установка устройства на Rails 2.3.5

Я работаю над rails 2.3.5, ruby ​​1.8.7-p302 и пытаюсь установить devise, поэтому я добавил gem 'devise' в свой Gemfile, затем установка пакета работала нормально, затем я попытался создать сценарий / создать devise: установить, но это терпит неудачу, и я не знаю причину этого

 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

1 ответ

Решение

Вы, вероятно, должны изменить свою версию устройства, так как она выбирается из основной ветки.

Пытаться:

gem 'devise', '1.0.7'

Другие вопросы по тегам