Hello, I’m trying to make my db, but when I put the code, it just don’t
do nothing…
felipe@Felipe:~/rails_projects/mailler$ rake db:migrate
felipe@Felipe:~/rails_projects/mailler$
what can be ?
Thank you.
Hello, I’m trying to make my db, but when I put the code, it just don’t
do nothing…
felipe@Felipe:~/rails_projects/mailler$ rake db:migrate
felipe@Felipe:~/rails_projects/mailler$
what can be ?
Thank you.
Try executing:
bundle exec rake db:create
then
bundle exec rake db:migrate
On Thu, Feb 9, 2012 at 10:40 PM, Felipe Pieretti U. <
felipe@Felipe:~/rails_projects/mailler$ bundle exec rake db:create
mailler_development already exists
rake aborted!
Mysql::Error: Access denied for user ‘mailler’@‘localhost’ to database
‘mailler_test’: CREATE DATABASE mailler_test
DEFAULT CHARACTER SET
utf8
COLLATE utf8_unicode_ci
Tasks: TOP => db:create
(See full trace by running task with --trace)
felipe@Felipe:~/rails_projects/mailler$ bundle exec rake db:migrate
felipe@Felipe:~/rails_projects/mailler$
thank you
On Fri, Feb 10, 2012 at 1:56 AM, Felipe Pieretti U. <
[email protected]> wrote:
felipe@Felipe:~/rails_projects/mailler$ bundle exec rake db:create
mailler_development already exists
So, your db exists and is reachable.
rake aborted!
Mysql::Error: Access denied for user ‘mailler’@‘localhost’ to database
‘mailler_test’: CREATE DATABASEmailler_test
DEFAULT CHARACTER SET
utf8
COLLATEutf8_unicode_ci
Tasks: TOP => db:create
(See full trace by running task with --trace)
Don’t worry about this yet (you have not configured
the database.yml “test” section yest, you can do that later).
felipe@Felipe:~/rails_projects/mailler$ bundle exec rake db:migrate
So, this probably means that all required migrations have been run.
It only runs new migrations that are not yet in the database.
To see “something” moving … you could do something like this:
$ bundle exec rails generate model Foo name:string # generates a new
model
with it’s migration
invoke active_record
create db/migrate/20120210082759_create_foos.rb
create app/models/foo.rb
invoke rspec
create spec/models/foo_spec.rb
invoke factory_girl
create spec/factories/foos.rb
$ bundle exec rails destroy model Foo name:string # removing that Foo
test
model from the code also
invoke active_record
remove db/migrate/20120210082759_create_foos.rb
remove app/models/foo.rb
invoke rspec
remove spec/models/foo_spec.rb
invoke factory_girl
remove spec/factories/foos.rb
HTH,
Peter
–
*** Available for a new project ***
Peter V.
http://twitter.com/peter_v
http://rails.vandenabeele.com
http://coderwall.com/peter_v
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs