Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 16th, 2012  |  syntax: None  |  size: 1.41 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Decided to get started using RVM on my Mac, unfortunately, right before continuing development on an otherwise sturdy app.
  2.  
  3. Upon start-up, there were errors in the log starting with
  4.  
  5.  
  6. /!\ FAILSAFE /!\ Sat Dec 11 17:17:47 -0600 2010
  7. Status: 500 Internal Server Error
  8. uninitialized constant MysqlCompat::MysqlRes
  9. /Users/username/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant'
  10. /Users/username/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing'
  11. /Users/username/.rvm/gems/ruby-1.8.7-p302/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:9:in `define_all_hashes_method!'
  12.  
  13. From other posts, it appears mysql simply wasn’t being loaded properly.
  14.  
  15. The full fix probably depends on whatever hacks you took to get mysql and ruby on your system the first time. I didn’t see the steps al in one place, so here they are.
  16.  
  17. 1. Uninstall the mysql gem
  18. gem uninstall mysql
  19.  
  20. 2. Uninstall rvm’s ruby
  21. rvm remove ruby-1.8.7
  22.  
  23. 3. Install RVM considering the i386 architecture
  24. rvm_archflags="-arch i386" CFLAGS="-arch i386" LDFLAGS="-arch i386" rvm install 1.8.7 --patch osx-arch-fix
  25.  
  26. 4. Install mysql gem with architecture flags
  27. env ARCHFLAGS="-arch i386 -arch x86_64" ; gem install --no-rdoc --no-ri mysql -- --with-mysql-dir=/usr/local/mysql/lib/ --with-mysql-config=/usr/local/mysql/bin/mysql_config