Note that there are some explanatory texts on larger screens.

plurals
  1. POError happening when running "rake db:create RAILS_ENV='development' "
    text
    copied!<p>I am getting this error in my terminal when i execute the command above, </p> <pre><code>Deans-MacBook:depot dean$ rake db:create RAILS_ENV='development' (in /Users/dean/src/RailsBook/depot) Couldn't create database for {"username"=&gt;"root", "adapter"=&gt;"mysql", "database"=&gt;"depot_development", "host"=&gt;"localhost", "password"=&gt;nil}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation) </code></pre> <p>In database config file i have the following:</p> <pre><code>development: adapter: mysql database: depot_development username: root password: host: localhost </code></pre> <p>I have the mysql gem installed and now i am unsure on what to do next. I am running snow leopard on a Macbook. Does anyone know why this error is happening? Thanks in Advance<br> Dean<br> EDIT<br> Executed the command in the comment and got the following:</p> <pre><code>Deans-MacBook:depot dean$ rake -t db:create RAILS_ENV='development' (in /Users/dean/src/RailsBook/depot) ** Invoke db:create (first_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute db:create Couldn't create database for {"username"=&gt;"root", "adapter"=&gt;"mysql", "database"=&gt;"depot_development", "host"=&gt;"localhost", "password"=&gt;nil}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation) </code></pre> <p>EDIT 2 I have uninstalled the mysql gem and reinstalled it and i noticed that an error happened here it is: </p> <pre><code>Deans-MacBook:~ dean$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config Building native extensions. This could take a while... Successfully installed mysql-2.8.1 1 gem installed Installing ri documentation for mysql-2.8.1... No definition for next_result No definition for field_name No definition for field_table No definition for field_def No definition for field_type No definition for field_length No definition for field_max_length No definition for field_flags No definition for field_decimals No definition for time_inspect No definition for time_to_s No definition for time_get_year No definition for time_get_month No definition for time_get_day No definition for time_get_hour No definition for time_get_minute No definition for time_get_second No definition for time_get_neg No definition for time_get_second_part No definition for time_set_year No definition for time_set_month No definition for time_set_day No definition for time_set_hour No definition for time_set_minute No definition for time_set_second No definition for time_set_neg No definition for time_set_second_part No definition for time_equal No definition for error_errno No definition for error_sqlstate Installing RDoc documentation for mysql-2.8.1... No definition for next_result No definition for field_name No definition for field_table No definition for field_def No definition for field_type No definition for field_length No definition for field_max_length No definition for field_flags No definition for field_decimals No definition for time_inspect No definition for time_to_s No definition for time_get_year No definition for time_get_month No definition for time_get_day No definition for time_get_hour No definition for time_get_minute No definition for time_get_second No definition for time_get_neg No definition for time_get_second_part No definition for time_set_year No definition for time_set_month No definition for time_set_day No definition for time_set_hour No definition for time_set_minute No definition for time_set_second No definition for time_set_neg No definition for time_set_second_part No definition for time_equal No definition for error_errno No definition for error_sqlstate </code></pre> <p>I hope this helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload