我对Ruby on Rails上的JQuery File Uploader感兴趣,并尝试使用this application m和this one
我用“rails new fily”创建了一个新的rails项目,并复制并粘贴了他们在这个应用程序中的fily文件夹中的所有文件。我运行bundle install
和rake db:migrate
,但打开localhost:3000/picture
我看到的唯一内容是:[]
,括号等等。可能是什么原因?
在终端我看到如下:
Started GET "/pictures" for 127.0.0.1 at 2012-10-21 23:21:13 +0200
Processing by PicturesController#index as HTML
Picture Load (0.2ms) SELECT "pictures".* FROM "pictures"
Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.2ms)
[2012-10-21 23:21:14] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
如果有人帮助我,我将不胜感激
PS。我在那里找到了一些非常奇怪的隐藏文件:
.rvmrc
内容:
rvm use ruby-1.9.3-p194@fily
这意味着什么?
答案 0 :(得分:1)
.rvmrc文件由RVM(Ruby Version Manager)使用,它允许多个版本的Ruby在一台机器上共存,并允许您指定要使用的版本。 .rvmrc告诉RVm使用指定版本的ruby,虽然在我看来,制作git repo的人使用了他自己编译的源代码。我不认为删除它会带来任何伤害。
查看代码,(在这台机器上没有红宝石,所以我无法测试它确定),好像你不应该访问/图片。相反,只需访问/(调用并呈现图片#new controller)。