mark-moseley / linecache

GNU General Public License v2.0
29 stars 20 forks source link

no such file to load -- require_relative #9

Closed bkuhlmann closed 7 years ago

bkuhlmann commented 13 years ago

While running a simple rake task in my Rails project (i.e. rake db:drop), I started getting the following stack dump:

rake aborted! no such file to load -- require_relative /Users/brooke/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in require' /Users/brooke/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:inrequire' /Users/brooke/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in load_dependency' /Users/brooke/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:596:innew_constants_in' /Users/brooke/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in load_dependency' /Users/brooke/.rvm/gems/ruby-1.8.7-p330/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:inrequire' /Users/brooke/.rvm/gems/ruby-1.8.7-p330/gems/linecache-0.45/lib/linecache.rb:66

Sure enough, the reference to "require_relative" did not make Rake happy. I ended up reverting back to linecache, version 0.43 in order to workaround this issue.

annaswims commented 13 years ago

I believe require_relative is only available in ruby 1.9.

michaelklishin commented 13 years ago

There is a require_relative gem but linecache.gemspec does not specify it as a dependency.

michaelklishin commented 13 years ago

Unfortunately, to properly fix this issue we also need to wait until this require_relative issue is resolved.

steveklabnik commented 13 years ago

If you can't wait the day or two till I make a new release, you can always bundle your own edge version.

gem "require_relative", :git => "https://github.com/whatever/require_relative.git"
michaelklishin commented 13 years ago

I opened up a pull request with a fix

jfirebaugh commented 12 years ago

This was a bug in the 1.8.7 version of linecache, and was fixed in version 0.46. This repo is for the 1.9 version. So this issue can be closed.

bkuhlmann commented 7 years ago

:information_source: Closing this issue, per the above discussion, as it no longer needs to remain open.