views:

2149

answers:

6

Running Snow Leopard. Tried uninstalling, and re-installing. Still getting the same error whenever I run a rake task.

mbpro:redmine shereef$ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0]

mbpro:redmine shereef$ rails -v Rails 2.3.4

mbpro:redmine shereef$ which rails /usr/local/bin/rails

mbpro:redmine shereef$ gem -v 1.3.5

mbpro:redmine shereef$ which gem /usr/local/bin/gem

mbpro:redmine shereef$ rake -v (in /Users/shereef/Documents/Code/BetterMeans/redmine) Missing the Rails 2.3.4 gem. Please gem install -v=2.3.4 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. mbpro:redmine shereef$ which rake /usr/bin/rake

mbpro:redmine shereef$ $PATH -bash: /usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin: No such file or directory

mbpro:redmine shereef$

+1  A: 

Have you tried running rake:rails:update in your application?

John Topley
Redmine can get a bit tricky - they're pretty good on the support side though. (and congrats on getting the first Rails badge, btw)
Mike Woodhouse
Thanks Mike! :-)
John Topley
A: 

Since you have your own copy of ruby in /usr/local, I suspect that somehow rake is still trying to use the builtin os x ruby/gem command.

Try running 'gem env' to make sure your environment is set up correctly. In particular, look at the GEM PATHS: to make sure they are pointed at your /usr/local directory. If they are wrong try setting GEM_HOME and/or GEM_PATH in your environment.

Here is what my output looks like (though I use a ruby install dir in my own how directory via the ruby_switcher.sh tool (http://github.com/relevance/etc)

    RubyGems Environment:
      - RUBYGEMS VERSION: 1.3.5
      - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0]
      - INSTALLATION DIRECTORY: /Users/ashebanow/.gem/ruby/1.8
      - RUBY EXECUTABLE: /Users/ashebanow/.ruby_versions/ruby-1.8.7-p174/bin/ruby
      - EXECUTABLE DIRECTORY: /Users/ashebanow/.gem/ruby/1.8/bin
      - RUBYGEMS PLATFORMS:
        - ruby
        - x86-darwin-10
      - GEM PATHS:
         - /Users/ashebanow/.gem/ruby/1.8
      - GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000
         - :sources => ["http://gems.rubyforge.org/", "http://gems.github.com/"]
      - REMOTE SOURCES:
         - http://gems.rubyforge.org/
         - http://gems.github.com/
Shebanator
A: 

I too had faced a similar issue. Please verify whether rails 2.3.4 is installed properly using the "gem list" command. If more than one copy of rails are present in gem list, remove the unwanted version using "gem uninstall rails" and select the required version.

Prem
+2  A: 

On Fedora 12 you need to

$ gem install -v=1.0.1 rack

for the bundled rails to work.

prokoba
I had similar problems on Windows and were solved removing all rack versions (1.0.0 and 1.1.0) and then installing rack 1.0.1.
Marc Climent
A: 

I had similar problems, and another gem to keep an eye on is activesupport. I found if I had other versions that differed from my Rails version, it could cause this as well.

tlianza
A: 

Whenever I installed a newer version of rack this would happen. Making sure I had v 1.0.1 made it always work.

NamiDark