SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Nov 5, 2005, 13:00 #1
- Join Date
- May 2003
- Location
- virginia
- Posts
- 988
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
scaffold: mysql can't connect and more - OS X Tiger
I finally decided to jump and learn! I just bought the Agile Web Dev with Rails book and so far so good, except I've now hit a wall. I've changed my config file to match the db settings, but everytime I run the scafoold script I get this:
Code:$ sudo ./script/generate scaffold product admin 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: 'root@localhost' (Using password: YES)
I'm running OS X 10.4.3 with the latest MySQL 4 update. I've used gem to update everything. Actually, another weird problem: when I use gem to install mysql, I get a strange error:
Code:sudo gem install mysql Password: Attempting local installation of 'mysql' Local gem file not found: mysql*.gem Attempting remote installation of 'mysql' Building native extensions. This could take a while... can't find header files for ruby. 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\n Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
Thanks in advance!
-matt
-
Nov 5, 2005, 13:50 #2
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by mwmitchell
If it works, then it is just a conflict with the drivers, if not there are more problems going on.
DouglasHello World
-
Nov 5, 2005, 13:59 #3
- Join Date
- May 2003
- Location
- virginia
- Posts
- 988
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hmm, I removed my passwords and now get this:
Code:sudo ./script/generate scaffold product admin 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 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
-
Nov 6, 2005, 15:13 #4
- Join Date
- May 2003
- Location
- virginia
- Posts
- 988
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Solved
OK, I installed XCode tools and everything just kind of worked. I had to re-install gems and mysql, but it was pretty painless.
Thanks for your help
-matt
Bookmarks