Thx Frederick, You where right about the syntax error in the database.yml... think i used tabs. So the scaffold command works now but if it try to run: $ rake db:migrate (in /Users/daniel/Sites/rails_mysql) dyld: lazy symbol binding failed: Symbol not found: _mysql_init Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/ mysql2.bundle Expected in: flat namespace
dyld: Symbol not found: _mysql_init Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/ mysql2.bundle Expected in: flat namespace Trace/BPT trap Can you help me out with this one? Thx! On 9 jan, 15:05, Frederick Cheung <[email protected]> wrote: > On Jan 9, 1:52 pm, Daniel Amsterdam <[email protected]> wrote: > > > Hi everybody, > > > Can someone tell me how i can set up Rails 3.0.3 working with mysql on > > Snow Leopard 32bit? i've tried adding the gem 'mysql2' in my gem file > > and run 'bundle install' with the database.yml set to: > > Sounds like a syntax error in your database.yml file. Make sure you're > using spaces and not tabs, be wary of special characters. > > Fred > > > > > development: > > adapter: mysql2 > > database: rails_mysql_database > > username: root > > password: root > > > With the setup as above, when i run $ rails generate scaffold test > > name:string > > invoke active_record > > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ > > 1.8/yaml.rb:133:in `load': syntax error on line 15, col 0: > > `test:' (ArgumentError) > > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ > > ruby/1.8/yaml.rb:133:in `load' > > from > > /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails/application/ > > configuration.rb:88:in `database_configuration' > > from > > /Library/Ruby/Gems/1.8/gems/activerecord-3.0.3/lib/active_record/ > > railtie.rb:58 > > and the list goes on with errors like above... > > > Since i already had some trouble getting mysql to work with rails, i > > thought maby somebody here can help me with this? mysql is working > > fine and a connection with php is no problem. When i google it i only > > find people having trouble setting up mysql with rails 3 but no > > solutions. I don't use macports or rvm.. just rubygems > > > Hope one of you can help me out? > > > Thanks in advance! > > > $ ruby --version > > ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] > > $ rails --version > > Rails 3.0.3 > > $ gem --version > > 1.4.2 > > $ sudo /usr/local/mysql/bin/mysqladmin > > Ver 8.42 Distrib 5.1.54, for apple-darwin10.3.0 on i386 -- 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.

