#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2010
    Posts
    61
    Rep Power
    4

    RoR: Error Starting WEBrick


    Following the tutorial on lynda.com and just completed installing all components and creating the project. When attempting to start up the server I am getting the following error(s?).

    I am assuming the 'Reason' highlighted in red is the main problem.

    Thank you in advane.

    GFP:simple_cms username$ rails server
    /usr/local/lib/ruby/gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle: dlopen(/usr/local/lib/ruby/gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
    Referenced from: /usr/local/lib/ruby/gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle
    Reason: image not found - /usr/local/lib/ruby/gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle
    from /usr/local/lib/ruby/gems/1.8/gems/mysql2-0.2.11/lib/mysql2.rb:9
    from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'
    from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each'
    from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler.rb:120:in `require'
    from /Users/georgepapini/Sites/simple_cms/config/application.rb:7
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:28:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:28
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:27:in `tap'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:27
    from script/rails:6:in `require'
    from script/rails:6

    If it matters or helps:

    gem list

    *** LOCAL GEMS ***

    abstract (1.0.0)
    actionmailer (3.0.9, 2.3.8, 2.3.5, 2.3.4)
    actionpack (3.0.9, 2.3.8, 2.3.5, 2.3.4)
    activemodel (3.0.9)
    activerecord (3.0.9, 2.3.8, 2.3.5)
    activeresource (3.0.9, 2.3.8, 2.3.5, 2.3.4)
    activesupport (3.0.9, 2.3.8, 2.3.5)
    arel (2.0.10)
    builder (2.1.2)
    bundler (1.0.15)
    erubis (2.6.6)
    i18n (0.5.0)
    mail (2.2.19)
    mime-types (1.16)
    mysql (2.8.1 ruby)
    mysql2 (0.3.6, 0.2.11)
    polyglot (0.3.1)
    rack (1.2.3, 1.1.0, 1.0.0)
    rack-mount (0.6.14)
    rack-test (0.5.7)
    rails (3.0.9, 2.3.8, 2.3.5, 2.3.4)
    railties (3.0.9)
    rake (0.9.2, 0.8.7)
    rdoc (3.6.1)
    rubydoctest (1.0.0)
    rubygems-update (1.8.5, 1.3.7)
    thor (0.14.6)
    treetop (1.4.9)
    tzinfo (0.3.28)

    which gem
    /usr/local/bin/gem
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2010
    Posts
    61
    Rep Power
    4

    Resolved:


    Found the answer (that worked for me) on the stackoverflow board:

    sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

IMN logo majestic logo threadwatch logo seochat tools logo