Question

For some time now, sometime my rails console goes crazy. It seems to not get what I type or omit some letters or move them around in the sentence and I'll get error messages because of that. Tipically I'll just exit the console and have to restart my GitBash and that will do the trick but not sure why?

This only happens when in rails console not anywhere else, any ideas why? Here is a sample error when I went into rails console and typed in u = User.new and hit enter this happened:

$ rails console
DL is deprecated, please use Fiddle
Loading development environment (Rails 4.0.3)
irb(main):001:0> u = User.new
SyntaxError: (irb):1: syntax error, unexpected '='
 =sene
  ^
        from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.3
/lib/rails/commands/console.rb:90:in `start'
        from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.3
/lib/rails/commands/console.rb:9:in `start'
        from c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.3
/lib/rails/commands.rb:62:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'
irb(main):002:0>

Ever seen something like this?

Was it helpful?

Solution

Your terminal may not be set up correctly to use UTF-8 etc.

If, in your terminal, you run $ locale and see anything other than a bunch of "xx_XX.UTF-8" you might consider taking a look at 'A guide to help set up terminal'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top