Self Teaching NEWBIE question

Hey guys, searched a bit, but with my lack of total understanding figured best just to post a unique tip for help.


I am self teaching myself Ruby on Rails and Ruby using CodeSchool.com and Michael Hartl's book Ruby on Rails 3 Tutorial.  I am using Rubymine as suggested by a close friend who is currently going to school for IT and coding.  Love Rubymine just have a small issue.

I need to be able to run "rails console" for page 250ish in the book.  Obviously I cannot do that from "cmd" prompt like everything else to mimic Rubymine.  And I know that its under "Tools > Run Rail Console"  I have tried running it in default mode and development mode.  It gives me the following string back (reason i need to run is for user.create! , etc)... is my install wrong, coding just straight F****d, or am I missing a stupid step, appreciate all the help up front.

C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) "C:/Users/Jeff Gray/RubymineProjects/sample_apps/script/rails" console development
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError)
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands/console.rb:3:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands/console.rb:3:in `<top (required)>'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:38:in `require'
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:38:in `<top (required)>'
    from C:/Users/Jeff Gray/RubymineProjects/sample_apps/script/rails:6:in `require'
    from C:/Users/Jeff Gray/RubymineProjects/sample_apps/script/rails:6:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

Process finished with exit code 1




I just have no where to input coding from here, even tried IRB console(yes i know its different)... any direction or help be great.

Thanks,

Jeff Gray

*Self Teaching Ruby and Ruby on Rails"

3 comments

Hi,

just a guess: ruby on Windows doesn't like spaces in directory name.  Does rails console work when you run it from terminal?

Regards, Oleg.

0

what do you mean terminal... i connect to my "project" via "cmd prompt", but i cant run DB commands like user.create! because i am not in console, i was told this is a LIBREAD issue from not being installed, i have basically completly destroyed my setup from plug and playing different recommendations, just need a simple help... lol

0

Hi Jeff,

ok, let's start from the very begining :)

1. how have you installed the ruby on Windows (http://rubyinstaller.org/ is the preffered way to do this).
2. have you installed dev-kit (http://rubyinstaller.org/add-ons/devkit/)?
3. does "bundle install" works in the project directory in cmd?
4. does "bundle exec rails c" work in the project directory in cmd?

Regards, Oleg.

0

Please sign in to leave a comment.