0 0

关于Ruby的问题(rake db:migrate)15

本来是个java刚入行的菜鸟,公司来来个ruby项目,叫我来做;但是我完全不会,看来几天书和网上的资料,经过几天算是搭建好来ruby的环境,但在跑的时候出现来问题,自己弄来一天却还没搞定,就来问来,公司也没人知道。
首先,我输入命令是RAILS_ENV=production bundle exec rake db:migrate。出现以下错误:
Rails Error: Unable to access log file. Please ensure that /home/linyu/workShop/ebook/trunk/source/ebook/log/test.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed。
/home/linyu/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/open-uri.rb:36:in `initialize': Not a directory - /home/linyu/workShop/ebook/trunk/source/ebook/log/rss_spider.log (Errno::ENOTDIR)
.........(省略,都是些路径什么的)
最后出现的是
Tasks: TOP => default => test
(See full trace by running task with --trace)

用rake -v也会出现类似的错误。
这问题好郁闷,纠结了大半天,网上各种查找,还是没解决,唉。

之前用来bundle rake exec rake db:create  提示是:xxx already exsits(不知道对还是错,也没错误信息。)

怎么回事? 大神们帮忙看看,谢谢!


问题补充:哦哦,上面的错误是rake -v提示的,下面的信息才是rake db:migrate的错误信息,不过2个非常相似,大侠们帮忙看看,非常感谢!!
Rails Error: Unable to access log file. Please ensure that /home/linyu/workShop/ebook/trunk/source/ebook/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
rake aborted!
Not a directory - /home/linyu/workShop/ebook/trunk/source/ebook/log/rss_spider.log
2014年6月18日 17:28

1个答案 按时间排序 按投票排序

0 0

采纳的答案

已经提示 /log/production.log  这个文件不存在,你自己去手工创建一个,把权限修改到666,再试试

2014年6月19日 19:27

相关推荐

Global site tag (gtag.js) - Google Analytics