Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKa Cin
5,025 PointsRake aborted error at rake db:create
When I run the command rake db:create, I get plenty errors which I don't get. Any help would be appreciated. Thanks in advance.
Kagans-MacBook-Pro:biller kaganalper$ rake db:create
rake aborted!
LoadError: dlopen(/Users/kaganalper/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/mysql2-0.3.17/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Users/kaganalper/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/mysql2-0.3.17/mysql2/mysql2.bundle
Reason: image not found - /Users/kaganalper/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/mysql2-0.3.17/mysql2/mysql2.bundle
/Users/kaganalper/Developer/RubyCourse/biller/config/application.rb:7:in <top (required)>'
/Users/kaganalper/Developer/RubyCourse/biller/Rakefile:4:in
<top (required)>'
(See full trace by running task with --trace)
2 Answers
Ka Cin
5,025 PointsI solved my trouble with this line of code.
export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
Andrew Carr
10,979 PointsHow'd you get that answer? It worked for me but I'm curious as to how you knew it'd be the right fix.
David Axelrod
36,073 PointsWhat this guy said! The export worked great but i have no idea why :/