Ruby on Rails Sunday, January 1, 2012

Try

  rake --trace

Sent from phone.

Peter

On Jan 2, 2012 5:34 a.m., "mapreferee ruby" <lists@ruby-forum.com> wrote:

I needed a migration to create the join table that can connect the model
category with the model Article. So, I run the following command:

$ rails generate migration create_articles_categories

And then I added the appropriate fields.

class CreateArticlesCategories < ActiveRecord::Migration
 def self.up
   create_table :articles_categories, :id => false do |t|
     t.references :article
     t.references :category
   end
 end

def self.down
   drop_table :articles_categories
 end
end

And then I run the migrations:

$ rake db:migrate

But then no response was shown for long.

And after that, anytimes when I run the rake command, no response was
shown. May I ask if I have done anything wrong here?

Any help much appreciated.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment