Reputation: 511
I installed rvm on my Mac OS X 10.6.8 (running Snow Leopard) and tried to start up my first sample app. After a few hours of fiddling around with the gems, I decided to post the issue here, because I really don't know how to figure this out:
Whenever I try to run the dev-server in my app-folder, I get the following error:
/Users/santeri/RubymineProjects/sample_app/script/rails server -b 0.0.0.0 -p 3000 -e development
/Users/santeri/.rvm/gems/ruby-2.0.0-p0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': dlopen(/Users/santeri/.rvm/gems/ruby-2.0.0-p0/gems/sqlite3-1.3.7/lib/sqlite3/sqlite3_native.bundle, 9): Library not loaded: /usr/local/lib/libsqlite3.0.8.6.dylib (LoadError)
Referenced from: /Users/santeri/.rvm/gems/ruby-2.0.0-p0/gems/sqlite3-1.3.7/lib/sqlite3/sqlite3_native.bundle
Reason: no suitable image found. Did find:
/usr/local/lib/libsqlite3.0.8.6.dylib: mach-o, but wrong architecture
/usr/local/lib/libsqlite3.0.8.6.dylib: mach-o, but wrong architecture - /Users/santeri/.rvm/gems/ruby-2.0.0-p0/gems/sqlite3-1.3.7/lib/sqlite3/sqlite3_native.bundle
I only have 1 ruby version installed inside my rvm:
/Users/santeri/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
Running 'lipo -info /usr/lib/libsqlite3.dylib' returns:
Architectures in the fat file: /usr/lib/libsqlite3.dylib are: x86_64 i386 ppc7400
Thanks for any help or hint!
Upvotes: 0
Views: 616
Reputation: 35370
I strongly recommend you install SQLite through Homebrew
Install Homebrew by running the following in your terminal and following the prompts and instructions
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Run brew install sqlite
This should solve your problems. This will give Rails an architecture-correct .dylib
file to work with, located in a directory like /usr/local/Cellar/sqlite/3.7.15.1/lib/
instead of /usr/local/bin
.
Upvotes: 3