我正确地运行了我的rails应用程序rails s -e production
,但是当我运行时rails generate scaffold Campaign title:string owner:string
我得到了
/Users/myhome/vendor/bundle/ruby/2.0.0/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
为什么会这样?由于应用程序正在运行,apache 正在正确运行