caught by gems

Hello,

I've set-up a new computer and I'm having troubles with gems.

In the production server and in my old developer machine works perfect, but in the nem I'm getting errors when I start them using thin:

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- will_paginate (MissingSourceFile)

gem environment

RubyGems Environment:   - RUBYGEMS VERSION: 1.3.4   - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]   - INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8   - RUBY EXECUTABLE: /opt/local/bin/ruby   - EXECUTABLE DIRECTORY: /opt/local/bin   - RUBYGEMS PLATFORMS:     - ruby     - x86-darwin-10   - GEM PATHS:      - /opt/local/lib/ruby/gems/1.8      - /Users/montx/.gem/ruby/1.8   - GEM CONFIGURATION:      - :update_sources => true      - :verbose => true      - :benchmark => false      - :backtrace => false      - :bulk_threshold => 1000   - REMOTE SOURCES:      - http://gems.rubyforge.org/

And I have installed the will_paginate gem in - /opt/local/lib/ruby/gems/1.8

gem list

*** LOCAL GEMS ***

pg (0.8.0) prawn (0.6.3) prawn-core (0.6.3) prawn-format (0.2.3) prawn-layout (0.3.2) prawn-security (0.1.1) will_paginate (2.3.11)

What I'm missing ???

thanks,

r.

can you write the line custom_require.rb:31 here to get it solve

kannav rajeev wrote:

can you write the line custom_require.rb:31 here to get it solve

    gem_original_require path

This line is from the file custom_require:

The error must be related to some path or similar, as if I paste de plug in will_paginate in vendors/plugins it works ...

But I believe my paths are ok, as I can find everything there ...

any idea ?

thanks!

regards,

r.

This is the problem - you've got two ruby versions installed (the one in /Library is the default Apple ruby, and the other in /opt), and the system is deciding to use the one in /Library, which doesn't have gems installed, when starting thin.

You may want to check the thin startup script - what does the #! line in it say?

--Matt Jones

Matt Jones wrote:

Run the command 'which thin' to find out where it's at.

--Matt Jones

Matt Jones wrote:

Of course you can, and it would have taken less time to try than to type that sentence...

Hassan Schroeder wrote: