I am developing Rails v2.3 application.
When I run "rake db:migrate" I got the following error message:
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
Access denied for user 'root'#'localhost' (using password: NO)
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
What is the reason?
It looks like your MySQL credentials are not set correctly in config/database.yml.
Related
I'm having issues installing the SOLIDUS gem for my rails app. I followed the instructions from GitHub but when i run the command bundle exec rake db:migrate i get the error:
mannay:testsite mannay$ bundle exec rake db:migrate
rake aborted!
PG::ConnectionBad: fe_sendauth: no password supplied
/usr/local/var/rbenv/versions/2.5.0/bin/bundle:23:in `load'
/usr/local/var/rbenv/versions/2.5.0/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
I've tried adding username: mannay to my database.yml and even password: but it doesn't work. I thought maybe i've added a password that i don't remember, so i opened postgressapp, and tested
ALTER USER mannay with password 'new_password';
but it doesn't change anything.
Any ideas?
Trying to get my rails up and running but am having a problem. When creating my new rails app on the command line I ran the usual
rails new PhotoApp -d postgresql
Generated my core scaffold. Then generated a model with attributes in the terminal and that was fine. After creating my model I first ran rake db:create and that returned a long log of characters with at the top telling me FATAL: role "PhotoApp" does not exist so then I tried rake db:migrate and that didn't work either returning me
rake aborted!
PG::ConnectionBad: FATAL: role "PhotoApp" does not exist
/Users/##$%^$#/Code/Projects/PhotoApp/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
WTF is going on here?
Thanks for any help.
The error is telling you that Postgres isn't finding your app. What does your database.yml file look like?
I would first run the rake task again, using the --trace as suggested:
rake db:create --trace
That will give you a more verbose tracing, so you can try to isolate the problem.
From experience I can tell you though that 'Roles' in Postgres can be a nightmare. How did you install Postgres on your machine? HomeBrew? The Postgres App?
Please post the full trace, as well as your database.yml file. This will help better assess the problem!
I want to install the fedena school management system. When I type rake gems:install I get the following error:
/usr/local/share/gems/gems/rake-0.8.7/lib/rake/alt_system.rb:32: Use RbConfig instead of obsolete and deprecated Config.
(in /var/www/html/fedena)
rake aborted!
undefined method `name' for "Ascii85":String
(See full trace by running task with --trace)
What shoud I do?
For fedena rake 0.8.7 Required So Open command Prompt
type gem install rake v-0.8.7
I need to make it to make my jQuery working on Heroku.
Here is my console:
$ rake assets:precompile
c:/Ruby192/bin/ruby.exe c:/Ruby192/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Access denied for user 'root'#'localhost' (using password: NO)
Tasks: TOP => environment
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [c:/Ruby192/bin/ruby.exe c:/Ruby192/bin/rak...]
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
When I try do run:
$ assets:precompile
sh: assets:precompile: command not found
EDITED:
Also I added this line to application.rb:
config.assets.initialize_on_precompile = false
You have mentioned wrong username and password of mysql. Some gems which need database access for assets:precompile.
jQuery validation is working locally, but it doesn't on Heroku.
There is no errors about it in console. What should I do ?
EDITED
den#DENYS /D/myapp (master)
$ RAILS_ENV=production bundle exec rake assets:precompile
c:/Ruby192/bin/ruby.exe c:/Ruby192/bin/rake assets:precompile:all RAIL
uction RAILS_GROUPS=assets
rake aborted!
Access denied for user 'root'#'localhost' (using password: NO)
Tasks: TOP => environment
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [c:/Ruby192/bin/ruby.exe c:/Ruby192/bi
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
Have you precompiled your assets before pushing to heroku?
RAILS_ENV=production bundle exec rake assets:precompile
You can find more information here.
If it doesn't solve your problem, please provide the heroku logs in your question.