Steve
Steve

Reputation: 3080

'rails generate model...' returns nothing

So I'm currently following this tutorial: http://net.tutsplus.com/tutorials/ruby/how-to-use-omniauth-to-authenticate-your-users/

And are suck on Step 5. I managed to do step 4 which uses the generate command to create a new controller file. Now I need to create a model for User with name and email as attributes. having typed in:

'rails generate model User name:string email:string'

It just hangs for a couple seconds before returning nothing and just providing me access to the command line again. (running windows 7)

I don't know if I'm missing something, I've installed gems for sqlite3 and activeRecord,not that I think this should be a issue.

I'm totally lost as it doesn't give me any information back and doesn't create the files I expect. I am typing these commands from within my application directory C:\user\steve\documents\gitrepositories\AppName

Upvotes: 0

Views: 411

Answers (2)

Alexander Popov
Alexander Popov

Reputation: 24885

I had the same issue with Rails 4.2.5 and Ruby 2.3. Running bundle update solved the problem for me.

Upvotes: 0

FedeX
FedeX

Reputation: 446

I think the tutorial it's confusing; because it saids "In the Rails console (rails console), create the new model." and you shouldn't do that in the rails console ("rails c" command) you should execute that comand in the windows console and of course in the root folder of your app. The command it's perfectly fine, Hope this helps

UPDATE:

try doing bundle before the stated command

Upvotes: 0

Related Questions