Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails console runs without prompt

When I run my rails console I got something like this:

Loading development environment (Rails 3.2.3)
/Users/sebastiannowak/.rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.0/lib/bundler.rb:254 warning: shadowing outer local variable - path
Switch to inspect mode.
Time.now
Time.now
2012-06-27 09:27:21 +0200

As you can see I can interact with console but it is quite uncomfortable. I run JRuby 1.6.7. Somebody has such issue?

like image 662
Sebastian Avatar asked Jun 27 '12 07:06

Sebastian


People also ask

How to Start a Rails console?

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 .

How to exit Rails console?

Starting a Rails console session To exit the console, type: quit .

How to exit Rails console mac?

Creating a new task using Task. We can exit the Rails console by typing exit.

What is the Rails console?

Rails console is an irb session that is built into the rails environment and is accessed by typing rails c into the terminal. It can be used to test association methods, validations and check error messages when building a rails app.


1 Answers

Most probably somewhere in you ~/.irbrc, you're doing:

IRB.conf[:PROMPT_MODE] = :XMP

Try removing that line. Or change it to:

IRB.conf[:PROMPT_MODE] = :SIMPLE
like image 137
Waseem Avatar answered Nov 09 '22 07:11

Waseem