Rake Migrate Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of rails db migrate not recognized this site About Us Learn more about Stack Overflow the company Business rake db:migrate aborted Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask error: command 'db:migrate' not recognized Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign
Rake Aborted
up migration error with rake db:migrate up vote 1 down vote favorite I created a new model, but when I run the rake db: migrate command, it shoots me the following error: rake aborted! Gem::LoadError: You have already activated rake 10.4.0, but your Gemfile requires rake 10.3.2. Prepending `bundle exec` to your command may solve this. /Users/yedidyaweiner/projects/music-app/config/boot.rb:4:in `
rake 10.4.2, but your Gemfile requires rake 10.3.2. Prepending bundle exec to your command may solve this. /var/lib/gems/2.0.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:34:in block in setup' /var/lib/gems/2.0.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:19:insetup' http://stackoverflow.com/questions/27792852/migration-error-with-rake-dbmigrate /var/lib/gems/2.0.0/gems/bundler-1.7.3/lib/bundler.rb:121:in setup' /var/lib/gems/2.0.0/gems/bundler-1.7.3/lib/bundler/setup.rb:7:in' /home/ccuser/workspace/learn-rails-one-model/config/boot.rb:4:in
Forum → Rails & Code Javascript Disabled Detected You currently have javascript disabled. Several functions may not https://railsforum.com/topic/60780-error-in-rake-dbmigrate/ work. Please re-enable javascript to access full functionality. error in rake db:migrate Started by namud , Mar 19 2015 06:05 AM rake migrate Please log in to reply 1 reply to this topic #1 namud namud Passenger Members 1 posts Posted 19 March 2015 - 06:05 AM Dear friends please help me I am not recognized new to ruby on rails First create the rails application using: $ rails new blog Next, in the blog app directory, use the scaffold generator to create the MVC components needed for posts and comments: $ rails generate scaffold post title:string \ body:text $ rails generate scaffold comment post_id:integer \ body:text Now, create the rake migrate error post and comment database tables using: $ rake db:migrate but there comes following error: C:\Sites\blog>rake db:migrate == 20150319021253 CreatePosts: migrating ====================================== -- create_table(:posts) rake aborted! StandardError: An error has occurred, this and all later migrations canceled: undefined method `text' for :t:SymbolC:/Sites/blog/db/migrate/20150319021253_cre ate_posts.rb:6:in `block in change' C:/Sites/blog/db/migrate/20150319021253_create_posts.rb:3:in `change' C:in `migrate' NoMethodError: undefined method `text' for :t:Symbol C:/Sites/blog/db/migrate/20150319021253_create_posts.rb:6:in `block in change' C:/Sites/blog/db/migrate/20150319021253_create_posts.rb:3:in `change' C:in `migrate' Tasks: TOP => db:migrate (See full trace by running task with --trace) Back to top Report #2 Ohm Ohm Driver Moderators 527 posts LocationCopenhagen Posted 19 March 2015 - 10:05 AM What type of database are you using? What's the content of your db/migrate/20150319021253_cre ate_posts.rb-file? Seems like it have auto-generated some code like :t.text "body" for you, which should have been t.text "body" (The : is the culprit.) Blog: http://ohm.sh | Twitter: @madsohm| Work: Lokalebasen.dk Back to top Report Back to Rails & Code Also tagged with one or more of these keywords: rak