0

I am using c9 IDE.

The command I entered in the terminal: bundle exec rails generate migration CreateContacts.

I get a message: error: could not find 'rails'.

This is the command in Nitrous, is there a different command in cloud9?

Is there a step-by-step procedure to manually create the rails migration CreateContacts in the File Directory in cloud9? What code is entered into the newly created files. I notice in the Rails Guide a a file is generated e.g. number (YYYYMMDDHHMMSS)_create_contacts.rb, if this file is manually created will this number e.g. (20160928130510)_create_contacts.rb - be correct and what code is entered into the file?

I'm pretty stuck here and need some expert guidance on this one please.

Imran Ali
  • 2,223
  • 2
  • 28
  • 41
Theo
  • 31
  • 6
  • I think Cloud9 works the same way one should expect it from a normal development environment. Are you sure you are typing this command inside the rails application root path ? – dp7 Sep 28 '16 at 11:19

1 Answers1

1

I use cloud9 IDE as well and when i want to create a migration file i simply do rails generate migration . (I dont include bundle exec in the command)

The file generated in the migration folder will be created in the YYYYMMDDHHMMSS format.

angkiki
  • 510
  • 5
  • 20
  • Thanks Imran, you're a star, I entered rails generate migration CreateContacts in the Terminal, and the migration file was generated. Much appreciated my friend! – Theo Sep 28 '16 at 15:42
  • Imran your solution worked perfectly and it generated the migration file I needed. I am faced with another problem. My Submit button do not submit and I get no error message. The question was posted, it includes my code in the rails application. Your expert advice needed, I am stuck at this juncture. – Theo Oct 07 '16 at 11:41