6

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?

1
  • 1
    This happens to me, but only if I run with --ng (connect to nailgun). JRUBY_OPTS=' ' irb gives me the prompt, and :PROMPT_MODE is :DEFAULT.
    – Kelvin
    Jul 12, 2013 at 12:34

2 Answers 2

13

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
2
  • Wow, man! Thank you so much. In ~/.irbrc I haven't any line with prompt mode settings.
    – Sebastian
    Jun 27, 2012 at 8:19
  • Thank you! I came across the same problem and this solved it. Nov 2, 2012 at 23:59
3

On newer version of JRuby, the Rails console has a variety of other problems for me as well:

  • Command duplicated on the next line
  • Multiple Enter keypresses needed to exit
  • First command doesn't show while typing

Running the console with the following fixed it for me:

jruby -Xlaunch.inproc=true -S rails c

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.