[SOLVED]Your First Rails App


Hey fellow programmers,

An error appeared when trying to type this command in the app folder of my first rails app: rails generate scaffold car make:string model:string year:integer

/usr/lib/ruby/vendor_ruby/rails/railtie/configuration.rb:95:in method_missing': undefined methodload_defaults’ for #Rails::Application::Configuration:0x02035d5c (NoMethodError)yuffel@yuffel-ThinkPad-T43:~/Schreibtisch/odin_on_rails/my_first_rails_app$
from /home/yuffel/Schreibtisch/odin_on_rails/my_first_rails_app/config/application.rb:12:in <class:Application>' from /home/yuffel/Schreibtisch/odin_on_rails/my_first_rails_app/config/application.rb:10:inmodule:MyFirstRailsApp
from /home/yuffel/Schreibtisch/odin_on_rails/my_first_rails_app/config/application.rb:9:in <top (required)>' from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:92:inrequire’
from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:92:in preload' from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:153:inserve’
from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:141:in block in run' from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:inloop’
from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in run' from /var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in<top (required)>’
from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:inrequire’
from -e:1:in `’

This is the error.

Thanks in advance.


What does which ruby output in the terminal?




Thanks @Yuffel

What version of Ruby are you running? You can type ruby -v to find out


I am running the latest version. So 2.5.x


Can you run any other commands like rails s to start a server?


Yes, I can


Hi @Yuffel

I’m not sure what has happened but it seems maybe your rails app is trying to load some config options from a different version of rails.

I’d advise you start a fresh rails app and see if the same problem persists.


It does, sadly. I installed updates and thought that might fix it, but it didn’t…


I reinstalled ruby and rails and it works now :slight_smile:



Glad you got it working dude. Onwards and upwards.


figured it out