Is there another location Rails is looking for my irbrc config?
I have my .irbrc located in my ~/.irbrc.
I noticed that when I run 'rails console' on a Rails 3.x application, it says that its looking for a gem.
Gems missing: no such file to load -- ap
but if I run just 'irb' or 'script/console' on a rails 2.x app, everything works as it should be.
Is there another location Rails 3 looks fo开发者_StackOverflow社区r irbrc config?
I'm not sure if this information is applicable, but I'm running RVM on my box (Ubuntu)
I've just figured it out. I thought I paste it here for others who had the same problem as well.
According to http://matthewhutchinson.net/2010/9/19/rails-3-bash-aliases-and-irbrc-configs/page/2
You'll need to add your system gems into the Gemfile for Rails 3 applications (Bundler issue).
I did the above and it works.
Update
It seems like https://gist.github.com/2643079 is the most elegant solution I've found so far. It works pretty well too.
This is because of bundler and the way is disables system gems. There's a bunch of suggested ways to deal with this, none of them perfect (see this ticket on bundler for some suggestions).
精彩评论