Ruby on Rails Friday, May 1, 2015

To be able to use "rails dbconsole", mysql.exe needs to be in the
PATH.

Doing "rails dbconsole" is exactly the same as doing to MySQL Console
Client shortcut that should have been installed in your system.

If not, you can add the location of your MySQL installation (where
mysql.exe lives) to the PATH doing the following on a console:

SET PATH=%PATH%;C:\path\to\mysql

However, to avoid issues with spaces and such, I recommend you use the
MySQL Console Client shortcut.

Or Use Ubuntu In Short.

On Fri, May 1, 2015 at 3:56 PM, Manvi Sharma <lists@ruby-forum.com> wrote:
hi,

I am trying to use mysql instead of sqlite in RoR.(using Aptana Studio)
1) I added this line to the gem file
gem 'mysql2'
2)ran bundle install
3)made changes to the database.yml file
default: &default
  adapter: mysql2
  pool: 5
  timeout: 5000
  encoding: utf8
  username: root
  password: ******
  host: 127.0.0.1
  port: 3306

development:
  <<: *default
  database: rails_development
(has test and production also)


5) I type rails dbconsole / rails db on the terminal and get this error:
Couldn't find database client: mysql, mysql5, mysql.exe, mysql5.exe.
Check your $PATH and try again.

6) I added C:\Program Files\MySQL\MySQL Server 5.5\bin to the path

The error is still there.
What to do ?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cb2f5d449387498f87a2a169736ea1e2%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.



--

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CALSzCDDdRS7wuB26h5NxvMQ3gVAzqOj4NY%3D_F-e-EwYXH16SBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment