SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation script/generate model error:

    Hi guys,
    I am running Mac OS X and with it I have everything preinstalled. Which is great except it does not work. If I try to generate model I get error :
    THIS IS THE ACTUAL OUTPUT:

    >>
    joda$ ruby script/generate model Page
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 18, col 2: ` pool: 5' (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/rails-2.2.2/lib/initializer.rb:819:in `database_configuration'
    from /Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/initializer.rb:391:in `initialize_database'
    from /Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/initializer.rb:139:in `process'
    from /Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send'
    from /Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run'
    from /Users/joda/Public/www/spisaniata/config/environment.rb:13
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
    from /Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/commands/generate.rb:1
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
    from script/generate:3
    >>
    I tried to solve it on my own but browsing did not give result. Can somebody help. Thanks. Joro

  2. #2
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi All,

    I found the reason for the errors. It is required that if Ruby works with MySQL to create the databases in advance. I thought that it would be necessary when I use the migration , but NO ... It is needed from scratch .
    So if you ever get this message, check your databases.

    Now it all works fine.
    Thanks.


Tags for this Thread

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
  •