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. -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Try executing: bundle exec rake db:create then bundle exec rake db:migrate On Thu, Feb 9, 2012 at 10:40 PM, Felipe Pieretti Umpierre < lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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. > > -- > 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 -- 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 post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Feb 10, 2012 at 1:56 AM, Felipe Pieretti Umpierre < lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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 DATABASE `mailler_test` DEFAULT CHARACTER SET > `utf8` COLLATE `utf8_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 rake db:migrate # now there is 1 new migration that needs to run == CreateFoos: migrating ====================================================-- create_table(:foos) NOTICE: CREATE TABLE will create implicit sequence "foos_id_seq" for serial column "foos.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foos_pkey" for table "foos" -> 0.0299s == CreateFoos: migrated (0.0300s) =========================================== $ bundle exec rake db:rollback # rolling that back if yoiu don''t need it == CreateFoos: reverting ====================================================-- drop_table("foos") -> 0.0019s == CreateFoos: reverted (0.0020s) =========================================== $ 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 Vandenabeele http://twitter.com/peter_v http://rails.vandenabeele.com http://coderwall.com/peter_v -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.