“导轨生成模型..."不返回任何内容 [英] 'rails generate model...' returns nothing

查看:130
本文介绍了“导轨生成模型..."不返回任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我目前正在关注本教程: http://net.tutsplus. com/tutorials/ruby​​/how-to-use-omniauth-to-authenticate-your-users/

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

然后继续进行步骤5.我设法完成了步骤4,该步骤使用generate命令创建了一个新的控制器文件.现在,我需要为用户创建一个名称和电子邮件作为属性的模型.输入:

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生成模型用户名:字符串电子邮件:字符串"

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

它只是挂了几秒钟,然后什么也不返回,只是让我再次访问了命令行. (运行Windows 7)

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

我不知道我是否缺少什么,我已经为sqlite3和activeRecord安装了gems,不是我认为这应该是一个问题.

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.

我完全迷失了,因为它没有给我任何信息,也没有创建我期望的文件.我正在应用程序目录C:\ user \ steve \ documents \ gitrepositories \ AppName

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

推荐答案

我在Rails 4.2.5和Ruby 2.3中遇到了相同的问题.运行bundle update为我解决了这个问题.

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

这篇关于“导轨生成模型..."不返回任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆