I'm using Ubuntu 18.04, Ruby 2.6.3, and Rails 6. I'm working on a new rails project, and when i start the server, i have the following error :
> rails s
=> Booting Puma
=> Rails 6.0.2.1 application starting in development
=> Run `rails server --help` for more startup options
Exiting
Traceback (most recent call last):
[...]
72: from ./bin/rails:3:in `<main>'
71: from ./bin/rails:3:in `load'
70: from /home/franck/code/BTC1M/app-test/bin/spring:15:in `<top (required)>'
69: from /home/franck/.rbenv/versions/2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
68: from /home/franck/.rbenv/versions/2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
67: from /home/franck/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
66: from /home/franck/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
[...]
5: from /home/franck/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
4: from /home/franck/.rvm/gems/ruby-2.6.3/gems/less-rails-2.6.0/lib/less/rails/railtie.rb:17:in `block in <class:Railtie>'
3: from /home/franck/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `load_missing_constant'
2: from /home/franck/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in `rescue in load_missing_constant'
1: from /home/franck/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
/home/franck/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in `block in load_missing_constant': uninitialized constant Sprockets::Engines (NameError)
I tried to uninstall and re-install rails and ruby (through those steps) :
rvm implode
rm -rf ~/.rvm
rm -rf ~/.rbenv
sudo apt install -y build-essential tklib zlib1g-dev libssl-dev libffi-dev libxml2 libxml2-dev libxslt1-dev libreadline-dev
sudo apt clean
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 2.6.3
rbenv global 2.6.3
gem install rails
I also tried spring stop
, and updating sprockets and sprockets-rails : gem update
(my sprockets-rails version is 3.2.1), and updating the sprockets-rails version in Gemfile.lock : sprockets-rails (3.2.1)
. My sprockets version is 4.0.0.
I also added gem 'sprockets', git: 'git://github.com/rails/sprockets'
in my gemfile + bundle install
(as it was told on this thread : https://github.com/rails/sass-rails/issues/48 ) but it doesn't fix my issue.
I still have the same error. I don't understand what is going on. Any idea ?
By the way, why do i have a /home/franck/.rvm folder (that i deleted before) as i'm not using RVM but RBENV ?
The github repo is here : https://github.com/BTC1M/app-test