I have been use the rails console for testing and learning purposes and when I encounter an error I cannot exit anymore using the "Control + C" command. Is there another command to exit? This is what the console looks like when I try to do this:
ruby-1.9.2-p180 :026 > user.find_by_name("Test") NoMethodError: undefined method `find_by_name' for #<User:0x00000100f991a0> from /Users/easierlife/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/activemodel-3.0.7/lib/active_model/attribute_methods.rb:367:in `method_missing' from /Users/easierlife/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/activerecord-3.0.7/lib/active_record/attribute_methods.rb:46:in `method_missing' from (irb):26 from /Users/easierlife/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.0.7/lib/rails/commands/console.rb:44:in `start' from /Users/easierlife/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.0.7/lib/rails/commands/console.rb:8:in `start' from /Users/easierlife/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.0.7/lib/rails/commands.rb:23:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ruby-1.9.2-p180 :027 > ^C^C^C^C^C
Thanks
To exit the console, type: quit .
Go to your browser and open http://localhost:3000, you will see a basic Rails app running. You can also use the alias "s" to start the server: bin/rails s . The server can be run on a different port using the -p option. The default development environment can be changed using -e .
You could try:
exit
, then Enter.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With