Ruby on Rails console error

Discussion in 'Web Design and Development' started by barrysfarm, Dec 13, 2006.

  1. barrysfarm macrumors regular

    Joined:
    Nov 1, 2005
    #1
    I'm very new to the ruby on rails stuff, and i'm having a problem accessing the console. I've tried googling, but couldn't find anything that explained how to fix it. I've got ruby 1.8.2 installed (the universal binary version). I'm on a macbook. I'm a kind of stuck, so if anyone could offer their advice, i'd appreciate it.

    Barry-Abrams-Macbook:~/rubydev/moviecritic barry$ script/console
    Loading development environment.
    /usr/lib/ruby/1.8/irb/completion.rb:10:in `require': No such file to load -- readline (LoadError)
    from /usr/lib/ruby/1.8/irb/completion.rb:10
    from /usr/lib/ruby/1.8/irb/init.rb:218:in `require'
    from /usr/lib/ruby/1.8/irb/init.rb:218:in `load_modules'
    from /usr/lib/ruby/1.8/irb/init.rb:216:in `each'
    from /usr/lib/ruby/1.8/irb/init.rb:216:in `load_modules'
    from /usr/lib/ruby/1.8/irb/init.rb:21:in `setup'
    from /usr/lib/ruby/1.8/irb.rb:54:in `start'
    from /usr/bin/irb:13
     
  2. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #2
  3. barrysfarm thread starter macrumors regular

    Joined:
    Nov 1, 2005
    #3
    I downloaded ruby gems from rubygems.rubyforge.org, then went:

    tar xzf rubygems-0. {whatever the version # was}
    cd rubygems{folder}
    sudo ruby setup.rb

    sudo gem install rails --include-dependencies

    As far as I can tell, the rest of ruby & rails works. I'm able to set up models & scaffolding, and have it interact with my mysql database.
     
  4. barrysfarm thread starter macrumors regular

    Joined:
    Nov 1, 2005
    #4
  5. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #5
    So you never setup Ruby itself? If you are using the default Ruby install that comes with Tiger, it didn't include readline. Good luck with the reinstall
     
  6. barrysfarm thread starter macrumors regular

    Joined:
    Nov 1, 2005
    #6
    I guess not. I did it directly from a book (Beginning Ruby on Rails, Steven Holzner), which doesn't seem to be worth what i paid for.

    I'm somewhat new to working with the terminal. Should I uninstall my current installation or just install over the old installation?
     
  7. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #7
    Well the default ruby install is /usr and the new install will be in /usr/local - so no uninstall is necessary. Take note of the step where you modify the PATH env variable - thats what will allow you to use the newer version instead of the default.

    I got to imagine that someone has simplified this process, but haven't bother looking since this was linked to right out of ADC at http://developer.apple.com/tools/rubyonrails.html
     
  8. barrysfarm thread starter macrumors regular

    Joined:
    Nov 1, 2005
    #8
    Reinstalling with the tutorial provided seems to have fixed it.

    Thanks for all your help!
     

Share This Page