I created an application with ruby on rails in rubymine. I made it on Windows pc and it worked. Now I transferred it to a pc with Ubuntu and I installed ubuntu using this tutorial. Now I am getting an error when I call rails server on localhost:3000 and when I go to that page in my browser.
Puma caught this error: Missing `secret_key_base` for 'development' environment, set this value in `config/secrets.yml` (RuntimeError)
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.3/lib/rails/application.rb:513:in `validate_secret_key_config!'
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.3/lib/rails/application.rb:246:in `env_config'
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:693:in `build_request'
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.3/lib/rails/application.rb:521:in `build_request'
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:521:in `call'
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.8.2/lib/puma/configuration.rb:224:in `call'
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.8.2/lib/puma/server.rb:600:in `handle_request'
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.8.2/lib/puma/server.rb:435:in `process_client'
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.8.2/lib/puma/server.rb:299:in `block in run'
/home/fangio/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/puma-3.8.2/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
How can I fix this easily? I am an Ubuntu newbie.
it clearly says what is missing and where. You need to open "config/secrets.yml" and add secret key for development enviorment
U can generate random key using irb:
irb(main):003:0>
Then copy that long string into secret file