Rails 3 console and “no such file to load”
Posted on October 10, 2010, under Uncategorized.
If you happen to load gems in your ~/.irbrc , make sure to add a gem dependency on them in your Rails apps’ Gemfile.
For example, I just started using Awesome Print in IRB. However, when I ran rails console , this error occurred:
no such file to load -- ap
After searching Google, I learned that Awesome Print needs to be listed in my Gemfile . Easy enough:
## ~/.irbrc require 'rubygems' require 'ap' ## ~/src/rails_3_app/Gemfile group :development do gem 'awesome_print' end
2 Replies to "Rails 3 console and “no such file to load”"
nick on August 28, 2011
@ifightcrime Not as far as I know. This is because Bundler looks at your app’s Gemfile to determine which gems should be made available to your app.
ifightcrime on August 28, 2011
Is there a way to throw something in your .irbrc to just include these from your system gems?