Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails Console Not Loading

When trying to start rails console I keep getting the following error

Users/rigelstpierre/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/completion.rb:9:in `require': dlopen(/Users/rigelstpierre/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/readline.bundle, 9): Library not loaded: /Users/rigelstpierre/.rvm/usr/lib/libreadline.6.2.dylib (LoadError)
  Referenced from: /Users/rigelstpierre/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/readline.bundle
  Reason: image not found - /Users/rigelstpierre/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/readline.bundle
    from /Users/rigelstpierre/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>'
    from /Users/rigelstpierre/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.2/lib/rails/commands/console.rb:3:in `require'
    from /Users/rigelstpierre/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.2/lib/rails/commands/console.rb:3:in `<top (required)>'
    from /Users/rigelstpierre/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.2/lib/rails/commands.rb:38:in `require'
    from /Users/rigelstpierre/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.2/lib/rails/commands.rb:38:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Any thoughts? Rails 3.2.2 application

like image 588
rigelstpierre Avatar asked Sep 25 '12 21:09

rigelstpierre


People also ask

How to Start the Rails console?

Go to your browser and open http://localhost:3000, you will see a basic Rails app running. You can also use the alias "s" to start the server: bin/rails s . The server can be run on a different port using the -p option. The default development environment can be changed using -e .

How to quit Rails console?

Starting a Rails console session To exit the console, type: quit .

What is the Rails console?

Rails console is an irb session that is built into the rails environment and is accessed by typing rails c into the terminal. It can be used to test association methods, validations and check error messages when building a rails app.


1 Answers

It could be that there are multiple versions of readline installed.

Try the following:

brew link readline --force
like image 145
Ron Crosler Avatar answered Sep 21 '22 18:09

Ron Crosler