ruby - rails server 启动报错,内详
伊谢尔伦
伊谢尔伦 2017-04-24 09:10:19
0
1
628

$ rails server

/Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.17/lib/mysql2.rb:8:in `require': dlopen(/Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.17/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
  Referenced from: /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.17/lib/mysql2/mysql2.bundle
  Reason: unsafe use of relative rpath libmysqlclient.18.dylib in /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.17/lib/mysql2/mysql2.bundle with restricted binary - /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.17/lib/mysql2/mysql2.bundle
    from /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.17/lib/mysql2.rb:8:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
    from /Users/xxzyjy/zzetao/xxzedu/config/application.rb:7:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:78:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:78:in `block in server'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `server'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'
伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

Antworte allen(1)
左手右手慢动作

OSX 10.11 吧? 试试这个

sudo install_name_tool -change libmysqlclient.18.dylib \
  /usr/local/mysql/lib/libmysqlclient.18.dylib \
  /Library/Python/2.7/site-packages/_mysql.so
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!