首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在windows中运行rake db:create来安装fedena

无法在windows中运行rake db:create来安装fedena
EN

Stack Overflow用户
提问于 2017-02-05 14:50:20
回答 2查看 326关注 0票数 0

在windows中运行cmd时出现错误请告诉我该怎么做:这是rake

代码语言:javascript
复制
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for
example lib/tasks/capistrano.rake, and they will automatically be available to 
Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'

这是cmd窗口

代码语言:javascript
复制
c:\Fedena>rake db:create --trace
(in c:/Fedena)
rake aborted!
c:/Fedena/Rakefile:3: syntax error, unexpected kAND
...lib/tasks/capistrano.rake, and they will automatically be av...
                              ^
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/Ruby187/bin/rake:23:in `load'
C:/Ruby187/bin/rake:23
EN

回答 2

Stack Overflow用户

发布于 2017-02-05 15:18:38

这部分不应该被注释掉吗?

代码语言:javascript
复制
    # Add your own tasks in files placed in lib/tasks ending in .rake,
# for
#example lib/tasks/capistrano.rake, and they will automatically be available to 
#Rake.


require(File.join(File.dirname(__FILE__), 'config', 'boot'))


require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'

看起来它没有被注释掉,ruby正在尝试将其作为代码运行

票数 1
EN

Stack Overflow用户

发布于 2017-10-16 08:50:12

我的安装成功了。下面是我的rake文件内容:

代码语言:javascript
复制
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require(File.join(File.dirname(__FILE__), 'config', 'boot'))

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

require 'tasks/rails'

将上述内容复制并粘贴到rake文件中,然后重试

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42049328

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档