Ruby On Rails

82 views
Skip to first unread message

Duong vong veasna

unread,
May 20, 2014, 9:48:23 PM5/20/14
to rubyonra...@googlegroups.com
Dear all Rails Developers, i can not use the command "rails new app -d mysql" when i try to use this i got error.

please help me, thanks you.


Germano Teixeira

unread,
May 20, 2014, 10:34:16 PM5/20/14
to rubyonra...@googlegroups.com
Did you try install the mysql gem before run rails new command?

Try run "gem install mysql2" as suggested by the log. 
This will show you what is the real problem.


--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/69db2927-9daf-45f8-830e-d95e9b2f04a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Duong vong veasna

unread,
May 21, 2014, 1:01:29 AM5/21/14
to rubyonra...@googlegroups.com
when i use gem install mysql2. I got this error.

Result logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/mysql-2.9.1/gem_make.out

thanks you,

Duong vong veasna

unread,
May 21, 2014, 1:02:16 AM5/21/14
to rubyonra...@googlegroups.com
when i use gem install mysql2. I got this error.

Result logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/mysql-2.9.1/gem_make.out

thanks you,

Karthikeyan A K

unread,
May 21, 2014, 7:32:59 AM5/21/14
to rubyonra...@googlegroups.com
Sorry to say that long long ago tried to install MySQL gem in Windows 7 and 8 and was not able to do it. If possible shift to linux.

Loganathan Sellapa

unread,
May 21, 2014, 7:44:07 AM5/21/14
to rubyonra...@googlegroups.com
You need to place mysql client ddl file. Refer here http://stackoverflow.com/questions/8162322/set-up-rails-to-find-the-default-location-of-libmysql-dll . I installed ROR on windows sometime backa nd resolved the issue by placing the dll file.

regards,
Loganathan
Mob: +91 7760780741 | +91 9944414388
Skype: loganathan.sellappa
ViewMe



Duong vong veasna

unread,
May 21, 2014, 10:04:37 PM5/21/14
to rubyonra...@googlegroups.com
Dear Mr. Loganathan, After i copy dll file into ruby/bin then i start run "rails server", localhost:3000 not working, it said <mysql2::Error>
Access denied for user 'root'@'localhost' (using password: NO)


please help me, thanks you.

Loganathan Sellapa

unread,
May 21, 2014, 10:51:51 PM5/21/14
to rubyonra...@googlegroups.com
Did you set the Mysql username & password in database.yml and can you able to login via mysql client directly?

regards,
Loganathan
Mob: +91 7760780741 | +91 9944414388
Skype: loganathan.sellappa
ViewMe



Duong vong veasna

unread,
May 21, 2014, 11:22:31 PM5/21/14
to rubyonra...@googlegroups.com
Dear Mr. Loganathan

Could you tell me how to set username and password.
Do i have to put it in Railsinstaller folder? if that how to do?

thanks for your help.
veasna

Loganathan Sellapa

unread,
May 21, 2014, 11:27:26 PM5/21/14
to rubyonra...@googlegroups.com
You need to place the user name and password in database.yml.

  database: dbname
  adapter: mysql2
  encoding: utf8
  pool: 5
  username: mysql-username
  password:  mysql-password
  socket: /var/run/mysqld/mysqld.sock


regards,
Loganathan
Mob: +91 7760780741 | +91 9944414388
Skype: loganathan.sellappa
ViewMe



Duong vong veasna

unread,
May 21, 2014, 11:35:19 PM5/21/14
to rubyonra...@googlegroups.com
Thanks again Mr. Loganathan
but i am using window 8.

Loganathan Sellapa

unread,
May 21, 2014, 11:36:34 PM5/21/14
to rubyonra...@googlegroups.com
Whatever may be the OS, you need to configure the mysql credential in database.yml

regards,
Loganathan
Mob: +91 7760780741 | +91 9944414388
Skype: loganathan.sellappa
ViewMe



Duong vong veasna

unread,
May 21, 2014, 11:51:58 PM5/21/14
to rubyonra...@googlegroups.com
One more thing, I have create application with this command "rails new app -d mysql".
when i start server i got error :

Mysql2::Error

Access denied for user 'root'@'localhost' (using password: NO)

how to solve this error,

veasna

Carlos Mathiasen

unread,
May 22, 2014, 12:28:34 AM5/22/14
to rubyonra...@googlegroups.com
Maybe you should look the rails guides to resolve your problem[0]

TL:DR: You just need to update config/database.yml file with the correct authentication params for your MySQL server.


Matt's

Duong vong veasna

unread,
May 22, 2014, 4:36:23 AM5/22/14
to rubyonra...@googlegroups.com, gunma...@gmail.com
Thanks Loganathan and Matt's Now it work.

veasna
Reply all
Reply to author
Forward
0 new messages