Rake command not responding

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.

Try

rake --trace

Sent from phone.

Peter

On Jan 2, 2012 5:34 a.m., “mapreferee ruby” [email protected]
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

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 V. wrote in post #1039113:

Try

rake --trace

Sent from phone.

Peter

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 V. wrote in post #1039113:

Try

rake --trace

Sent from phone.

Peter