Ошибка при запуске неинициализированной постоянной Rail S Sprockets :: Rails :: VERSION (NameError) - PullRequest
0 голосов
/ 06 апреля 2020

Я не работал с Rails в течение нескольких лет, и я хочу обновить старое, устаревшее приложение Rails. Я пытался заставить его работать локально и танцевал обновляя версии Ruby, Rails и gem. Я погуглил эту ошибку бесконечно, но не могу понять. Это ошибка, которую я получаю при запуске rails s:

/Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bootstrap-sass-3.3.7/lib/bootstrap-sass/engine.rb:11:in `block in <class:Engine>': uninitialized constant Sprockets::Rails::VERSION (NameError)
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/railtie.rb:194:in `public_send'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/railtie.rb:194:in `method_missing'
from /Users/tambemac/Programming/rails_projects/thetens/config/environment.rb:8:in `<top (required)>'
from /Users/tambemac/Programming/rails_projects/thetens/config.ru:3:in `block in <main>'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
from /Users/tambemac/Programming/rails_projects/thetens/config.ru:in `new'
from /Users/tambemac/Programming/rails_projects/thetens/config.ru:in `<main>'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/commands/server.rb:50:in `app'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/commands/server.rb:130:in `log_to_stdout'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/commands/server.rb:67:in `start'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:81:in `block in server'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Это мой текущий пакет env:

Bundler       1.17.3
  Platforms   ruby, x86_64-darwin-18
Ruby          2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin18]
  Full Path   /Users/tambemac/.rbenv/versions/2.3.0/bin/ruby
  Config Dir  /Users/tambemac/.rbenv/versions/2.3.0/etc
RubyGems      3.1.2
  Gem Home    /Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0
  Gem Path    /Users/tambemac/.gem/ruby/2.3.0:/Users/tambemac/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0
  User Path   /Users/tambemac/.gem/ruby/2.3.0
  Bin Dir     /Users/tambemac/.rbenv/versions/2.3.0/bin
Tools         
  Git         2.20.1 (Apple Git-117)
  RVM         not installed
  rbenv       rbenv 1.1.1
  chruby      not installed

Вот мой гем-файл:

source 'https://rubygems.org'
ruby '2.3.0'

gem 'rails', '4.1.8'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails', '~> 3.1.0'
gem 'turbolinks'
gem 'jquery-turbolinks'
gem 'jbuilder', '~> 2.0.2'
gem 'bootstrap-sass', '~> 3.3.3'
gem 'twitter-bootstrap-rails', '~> 3.2.0'
gem 'devise', '~> 3.2.2'
gem 'simple_form'
gem "paperclip", "~> 4.2.0"
gem 'aws-sdk', '~> 1.32.0'
gem 'will_paginate', '3.0.7'
gem 'will_paginate-bootstrap'
gem "friendly_id", "~> 5.0.2"
gem 'faker', '1.2.0'
gem 'auto_html'
gem 'protected_attributes'
gem 'ckeditor', '~> 4.0.11'
gem 'font-awesome-rails'
gem 'acts-as-taggable-on', '~> 3.4'
gem 'haml', '~> 4.0.6'
gem 'nokogiri', '~> 1.10.0'

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

group :production do
    gem 'pg'
    gem 'rails_12factor'
end

group :development, :test do    
  gem 'sqlite3'
end


group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...