SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Guru
    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've tried different users, I tried the old_password() thing but still nothing. What is going on here folks? Smooth sailing until this.

    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
    Now that's one I serisouly don't get? Can't find Ruby header files? Hmm...

    Thanks in advance!

    -matt

  2. #2
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mwmitchell
    I've tried different users, I tried the old_password() thing but still nothing. What is going on here folks? Smooth sailing until this.
    Does it work when you use a blank password?

    If it works, then it is just a conflict with the drivers, if not there are more problems going on.

    Douglas
    Hello World

  3. #3
    SitePoint Guru
    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
    -matt

  4. #4
    SitePoint Guru
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •