Martijn: I had similar odd symptoms a while back. It turned out that I had two different versions of both Ruby and RubyGems installed and was trying to mix and match between them without realizing it.
Older versions of Ruby and Gem want to live in /usr, but newer versions seem to want to live in /usr/local. I was confused until I figured out that my development environment pointed to the newer versions, but my Rails app was pointing to the older versions. Commands issued from the command line found a new gem I'd installed, but of course the Rails app couldn't see it because I hadn't installed it for both old and new versions. If you have two (or more) versions installed on the same machine, make certain that your environment variables and your configuration files are set for the correct location for both Ruby and Rubygems. Be sure to check both Rails environments: development and production. If your development is done as one user and your Rails app runs as a different user, be sure to check the settings for both user accounts. Hope that helps. Kind Regards, Greg On Jan 29, 4:10 pm, Martijn Vos <[email protected]> wrote: > On Jan 29, 2009, at 8:51 PM, Julian Leviston wrote: > > > > > What OS and version and version of ruby? > > OS X 10.5.6 > > ruby 1.8.6.114 at /System/Library/Frameworks/Ruby.framework/Versions/ > 1.8/usr/bin/ruby > rubygems 1.3.1 at /Users/mcv/.gem/ruby/1.8, /Library/Ruby/Gems/1.8, / > System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > gems/1.8 > > Martijn. > > > On 30/01/2009, at 3:31 AM, Martijn Vos <[email protected]> wrote: > > >> Like the subject says, I've got a really weird problem. > > >> A co-worker added a couple of gems to our rails project. I installed > >> these gems on my machine (a macbook, os x 10.5.6), start the server, > >> and it says it can't find these gems: > > >> ============= > >> Missing these required gems: > >> mini_exiftool = 1.0.1 > >> mini_magick = 1.2.3 > > >> You're running: > >> ruby 1.8.6.114 at /System/Library/Frameworks/Ruby.framework/ > >> Versions/1.8/usr/bin/ruby > >> rubygems 1.3.1 at /Users/mcv/.gem/ruby/1.8, /Library/Ruby/Gems/ > >> 1.8, /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ > >> ruby/gems/1.8 > >> ============= > > >> Run `rake gems:install` to install the missing gems. > >> Exiting > > >> So I run `sudo rake gems:install` > > >> which says: > >> ============= > >> no such file to load -- mini_exiftool > >> (big stack-trace) > >> /usr/bin/rake:19:in `load' > >> /usr/bin/rake:19 > >> no such file to load -- mini_magick > >> /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in > >> `gem_original_require' > >> (big stack-trace) > >> /usr/bin/rake:19 > >> no such file to load -- mini_exiftool > >> (stacktrace) > >> no such file to load -- mini_magick > >> (etc) > >> gem install mini_exiftool --version "= 1.0.1" > >> Successfully installed mini_exiftool-1.0.1 > >> 1 gem installed > >> Installing ri documentation for mini_exiftool-1.0.1... > >> Installing RDoc documentation for mini_exiftool-1.0.1... > >> gem install mini_magick --version "= 1.2.3" > >> Successfully installed mini_magick-1.2.3 > >> 1 gem installed > >> Installing ri documentation for mini_magick-1.2.3... > >> Installing RDoc documentation for mini_magick-1.2.3... > >> ============= > > >> So it seems to claim it successfully installed something, despite > >> being > >> unable to find it? > > >> `rake gems` results in the same big stack traces, ending in: > > >> ============= > >> - [I] RedCloth = 3.0.4 > >> - [I] rmagick >= 2.3.0 > >> - [I] mislav-will_paginate >= 2.3.2 > >> - [R] tzinfo >= 0.3.12 > >> - [ ] mini_exiftool = 1.0.1 > >> - [ ] mini_magick = 1.2.3 > >> - [I] activemerchant > >> - [I] activesupport = 2.2.2 > >> - [I] builder = 2.1.2 > >> ============= > > >> `gem list` gives a big list of gems, including the two missing ones. > > >> So what's going wrong here? And how do I fix it? > > >> This might be related to a similar problem I had recently. I couldn't > >> get activemerchant to work. It kept failing during require, so I > >> ended > >> up installing in in the vendor folder of the project. But now it > >> looks > >> like it's a fundamental problem with my machine. > > >> I have sucessfully installed gems before, but that was before we > >> switched from Rails 2.1.0 to 2.2.2. In fact, I had a lot of trouble > >> getting any version of Rails other than 2.1.0 working. When my > >> co-worker was using Rails 2.1.1, I was still using 2.1.0, because > >> when I upgraded, I got an error that it couldn't start rails 2.1.0 > >> because 2.1.1 was already running. Or something like that. > > >> Anyway, it looks like there's something seriously wrong the Rails > >> installation on my machine, but I have no idea what. > > >> This problem is compounded by the fact that I'm both a newbie to > >> Ruby and to the Mac. So is there anyone with more experience with > >> this who can tell me what's wrong? > > >> Thanks, > >> Martijn. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

