I have started a new Ruby Rails project. I have a simple model that I have generated, migrated to the DB and now I am trying to run the IRB Console(Rails Console) inside RubyMine so I can interact with the DB. I have set the PATH in Default configurations for the IRB Console and I get this error:
NameError: uninitialized constant User
from /Users/******/.rvm/rubies/ruby-1.9.3-p362/bin/irb:16:in `’
from -e:1:in `load’
from -e:1:in `’
I do this through my command line and it works just fine when I do a ‘rails console’ command inside my Ruby project.
Any ideas or thoughts on what I may be doing wrong? I would think others would have this same problem or Jetbrains would have fixed this as it seems pretty standard to me.
Any help would be appreciated?
I'm not sure I've understood what exectly you are running.
In RM we have Tools|Run IRB Console.. menu item to run irb (which knows nothing about rails environment).
Also we have Tools|Run Rails Console.. which is the same as run "rails console" in command line.
So, what are you running?
Thanks Oleg you helped me realize that I was confused and was trying to run just the IRB. Sorry newbie to Ruby on Rails and RubyMine question. Still trying to sort it all out. This helped. I found the Rails Console in RubyMine which is different than the IRB and it is working fine.
You are always welcome