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 trial

Ruby ActiveRecord Basics Migrations and Relationships Migrations

Clara Nitsch
Clara Nitsch
13,449 Points

don't understand the response rake db:create gives

running rake db:create returns the following:

dyld: lazy symbol binding failed: Symbol not found: _mysql_server_init Referenced from: /Users/clara/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/mysql2-0.4.2/mysql2/mysql2.bundle Expected in: flat namespace

dyld: Symbol not found: _mysql_server_init Referenced from: /Users/clara/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/mysql2-0.4.2/mysql2/mysql2.bundle Expected in: flat namespace

Trace/BPT trap: 5

When I ignore this and continue with mysql -uroot, the terminal returns "-bash: mysql: command not found"

I am on OSX El Capitan and have mysql-5.7.10 Community Server installed.

Any idea what is going on? Many thanks in advance :)

1- open biller folder on (sublime text ) . 2- then go to (database.yml ) file on config folder. 3- write your password for (root'@'localhost ) that you use it on (MySQLWorkbench) program. 4- save (database.yml ) file.

on (database.yml ) file

# MySQL.  Versions 5.0+ are recommended.
#
# Install the MYSQL driver
#   gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
#   gem 'mysql2'
#
# And be sure to use new-style password hashing:
#   http://dev.mysql.com/doc/refman/5.0/en/old-client.html
#
default: &default
  adapter: mysql2
  encoding: utf8
  pool: 5
  username: root
  password: ******************** write your password here 
  socket: /tmp/mysql.sock

development:
  <<: *default
  database: biller_development ```

And for mysql -uroot

mysql -uroot -p

it will ask for password ( the password is the same for your (root'@'localhost ) and same what you write it in (database.yml ) file ..)

It is work with me 100% ..