Ruby On Rails

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.

https://lh4.googleusercontent.com/-7XFxj_-4JLA/U3wFXLFvi4I/AAAAAAAAADw/Ch7nQ8EHN80/s1600/error+02.png

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.

2014-05-20 22:48 GMT-03:00 Duong vong veasna [email protected]:

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,

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.

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 http://vizualize.me/loganathan

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.

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 http://vizualize.me/loganathan

On Thu, May 22, 2014 at 7:34 AM, Duong vong veasna

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

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 http://vizualize.me/loganathan

On Thu, May 22, 2014 at 8:52 AM, Duong vong veasna

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,

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 http://vizualize.me/loganathan

On Thu, May 22, 2014 at 9:05 AM, Duong vong veasna

Thanks again Mr. Loganathan
but i am using window 8.

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

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.

[0]
http://guides.rubyonrails.org/v3.2.13/getting_started.html#configuring-a-mysql-database

Matt’s

Thanks Loganathan and Matt’s Now it work.

veasna

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs