Can’t Find the Database?

When using MySQL with Rails, even following a successful installation of MySQL, Rails may display an error message similar to the following when you try to run your application:

no such file to load -- mysql

Some versions of Rails (Rails 2.2 and newer) require that the MySQL gem be installed as a separate operation. To do this, enter the following at the system prompt:

gem install mysql

Another problem may arise on Windows. When you run your application, it is possible that you will see an error message similar to this:

The specified module could not be found.
c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so

If you encounter this problem, you should be able to fix it by making a copy of a file called libmySQL.dll from your MySQL binary directory (for example, C:Program FilesMySQLMySQL Server 5.0in) into the Ruby binary directory (for example, C: ubyin). Restart your application (shut down and restart the server), and then try running it again.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.176.145