2

Does anyone have any idea what would cause this error when running a rake?:

dlopen(/Users/someone/.rvm/gems/ruby-1.9.3-p125@gaggleup/gems/linecache19-0.5.13-x86_64-darwin-11/lib/trace_nums19.bundle, 9): Library not loaded: /Volumes/Users/barry/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib Referenced from: /Users/someone/.rvm/gems/ruby-1.9.3-p125@gaggleup/gems/linecache19-0.5.13-x86_64-darwin-11/lib/trace_nums19.bundle Reason: image not found - /Users/someone/.rvm/gems/ruby-1.9.3-p125@gaggleup/gems/linecache19-0.5.13-x86_64-darwin-11/lib/trace_nums19.bundle

4 Answers4

5

It seems to me that you happen to use the quick fix for the ruby-debug19 which in fact use a custom gem source, more specifically this source 'https://gems.gemfury.com/8n1rdTK8pezvcsyVmmgJ/' in your Gemfile.

If you do, then you probably bump into the same issue I have here, that is a all gems installed from this source, for example linecache19 or pg-0.13.2-x86_64-darwin-11 are statically linked to library of user barry (probably the author). I did not much have success with custom source gems so I uninstall all of them and do it the hard way that is to grab the linecache gem from the sourceforge site.

Trung Lê
  • 5,188
  • 5
  • 27
  • 26
  • +1 for getting the linecache gem from sourceforge. Linecache is known for causing these kinds of errors, because it needs native libraries. – joelparkerhenderson Apr 01 '12 at 04:12
  • There's a one-liner on this response to make the hard way easier: http://stackoverflow.com/questions/8087610/ruby-debug-with-ruby-1-9-3 – stillmotion Apr 05 '12 at 21:57
  • FYI, the `debugger` gem is released today which allows you to install ruby-debug19 hassle-free, please check it at https://github.com/cldwalker/debugger – Trung Lê Apr 13 '12 at 01:40
0

Use the new gem "debugger" instead of ruby-debug19, fixes ruby-debug for ruby 1.9 and had its own linecache , lives here https://github.com/cldwalker/debugger

linojon
  • 1,052
  • 1
  • 10
  • 19
0

So I ran into a similar error trying to run 'bundle exec rspec spec' on my machine after installing mongodb with macports for my ruby application.

bash-3.2$ bundle exec rspec spec

**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance. You can install the extension as follows: gem install bson_ext

If you continue to receive this message after installing, make sure that the bson_ext gem is in your load path and that the bson_ext and mongo gems are of the same version.

/Users/dtengdin/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13-x86_64-darwin-11/lib/tracelines19.rb:12:in `require': dlopen(/Users/dtengdin/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13-x86_64-darwin-11/lib/trace_nums19.bundle, 9): Library not loaded: /Volumes/Users/barry/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib (LoadError) Referenced from: /Users/dtengdin/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13-x86_64-darwin-11/lib/trace_nums19.bundle Reason: image not found - /Users/dtengdin/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13-x86_64-darwin-11/lib/trace_nums19.bundle

I can't say for sure if this will work for you but what I found was that the macports instillation of mongo somehow messed up my gem files and after installing mongo with brew and uninstalling and manually deleting the gem folders with the -x86_64-darwin-11... extension on them I could run my rspec and cucumber tests with a mongod server running.

This is my first post on Stack Overflow I hope this may help!

David Tengdin
  • 321
  • 2
  • 7
0

Check your syntax in your database.yml file and make sure your aren't missing a variable or constant assignments there or in your initializes. I've had obscure rake errors with these causes.

Bob.
  • 1,737
  • 1
  • 15
  • 20