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.

Search Discussions

  • Peter Vandenabeele at Jan 2, 2012 at 6:27 am
    Try

    rake --trace

    Sent from phone.

    Peter

    On Jan 2, 2012 5:34 a.m., "mapreferee ruby" 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.
  • Mapreferee ruby at Jan 4, 2012 at 12:23 pm
    Hi Peter

    Not even rake --trace works as well.
    I have tried to reinstall the Rubygem. But it seems not related to this.

    Kindly wonder if anyone here has encountered this problem before?

    Any help appreciated please.

    Peter Vandenabeele wrote in post #1039113:
    Try

    rake --trace

    Sent from phone.

    Peter
    --
    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.
  • Mapreferee ruby at Jan 15, 2012 at 2:27 pm
    Hi Peter

    I found the cause. It's somehow because I have installed the rvm.
    But after removing those source codes in the ~/.bash_profile and
    ~/.bashrc files.

    Anyways, it is working now.

    mapreferee ruby wrote in post #1039382:
    Hi Peter

    Not even rake --trace works as well.
    I have tried to reinstall the Rubygem. But it seems not related to this.

    Kindly wonder if anyone here has encountered this problem before?

    Any help appreciated please.

    Peter Vandenabeele wrote in post #1039113:
    Try

    rake --trace

    Sent from phone.

    Peter
    --
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 2, '12 at 4:34a
activeJan 15, '12 at 2:27p
posts4
users2
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase