Reputation: 2074
I created a rails site with the *rails new {project_name} -d mysql*
and then cd to the project_name and ran the rails server command but got the error below, what could be the problem? Anyone knows? do i have to change the mode 040777? if yes, how? thanks
/Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:216: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
from /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2.rb:9
from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/henryjoseph/Sites/simple_cms/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53
from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50
from script/rails:6:in `require'
from script/rails:6
Upvotes: 0
Views: 261
Reputation: 4446
cd ur_dir
then you have to connect your mysql database to your project. for this you see the config/database.yml file where you have to add this
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: your_database_name
pool: 5
username: your_db_username
password: ur_db_password
host: localhost
then rails s
Upvotes: 1