[Rails] connecting to mysql on OS X 10.4
3quid
threequid at gmail.com
Tue Apr 4 16:26:28 GMT 2006
hi chris
I am stuck on the exact same line of code in the book.. i swear there
is a misprint or something! page 57 right?
anyway, i got past that error by including a specific username and
password (your login name and password) in my config/database.yml for
the development and test databases ... it says in the book that you
may have to do this with some combos of OSX/MySQL/Rails have you done
that?
anyhoo i now get an error upon reaching the same line in the output
( identical test/fixtures/products.yml ) which reads ...
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
plus a whole load of other code if I add -t to the command (full
output in my thread "newbie generate scaffold")
let me know if the database.yml file solves your initial problem..
and if you get the same second error as me.
3Quid
email - threequid at gmail.com
-----------------------------------
msn - threequid at gmail.com
aim - threequid at mac.com
-----------------------------------
On 4 Apr 2006, at 15:47:35, Chris Corwin wrote:
> i have looked in the archives, i have the _agile_ book, and its
> links right in front of me, and i have done pretty much everything
> i can think to do except start from a fresh OS install, and yet i
> still can not get Rails to talk to MySQL.
>
>
>
> when i try to do this:
>
> 237:/Library/WebServer/Documents/Rails/depot chris$ ruby script/
> generate scaffold Product Admin
>
>
>
> i get this output:
>
> exists app/controllers/
> exists app/helpers/
> exists app/views/admin
> exists test/functional/
> dependency model
> exists app/models/
> exists test/unit/
> exists test/fixtures/
> identical app/models/product.rb
> identical test/unit/product_test.rb
> identical test/fixtures/products.yml
> Access denied for user: 'xxxxxxx at localhost' (Using password: YES)
>
>
>
> the use in question exists, and Lasso (http://omnipilot.com) can
> get to the databases just fine, as can i in cocoamysql -- so i
> *know* the user/password combo works. it has for a long, long time.
>
>
>
>
> so, i've tried the fixconfig and such...
>
> here's an example output:
>
> Attempting local installation of 'mysql'
> Local gem file not found: mysql*.gem
> Attempting remote installation of 'mysql'
> Updating Gem source index for: http://gems.rubyforge.org
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (RuntimeError)
> ERROR: Failed to build gem native extension.
> Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/
> mysql-2.7 for inspection.
> ruby extconf.rb install mysql\nchecking for mysql_query() in -
> lmysqlclient... no
> checking for main() in -lm... yes
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lz... yes
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lsocket... no
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lnsl... no
> checking for mysql_query() in -lmysqlclient... no
>
>
> Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
>
>
>
> am i missing something?
>
>
>
> - chris corwin
> http://flickerbulb.com
>
>
>
>
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060404/a92172e8/attachment.html
More information about the Rails
mailing list