小编bla*_*014的帖子

咕噜致命错误:无法在Yeoman找到当地的咕噜声

我安装了yeoman并开始了官方文档中提供的示例.我完成了建议的操作

    yo webapp 
    bower install underscore  
    grunt
Run Code Online (Sandbox Code Playgroud)

在运行grunt之后,我收到了消息

    grunt-cli: The grunt command line interface. (v0.1.9)

    Fatal error: Unable to find local grunt.

    If you're seeing this message, either a Gruntfile wasn't found or grunt
    hasn't been installed locally to your project. For more information about
    installing and configuring grunt, please see the Getting Started guide:

    http://gruntjs.com/getting-started
Run Code Online (Sandbox Code Playgroud)

请注意,已经安装了grunt

    npm install -g grunt-cli
Run Code Online (Sandbox Code Playgroud)

    npm install -g grunt
Run Code Online (Sandbox Code Playgroud)

你在项目根目录中生成了Gruntfile.js,我正在运行该命令.
package.json也已生成:

    "name": "testyo",
    "version": "0.0.0",
    "dependencies": {},
    "devDependencies": {
      "grunt": "~0.4.1",
      "grunt-contrib-copy": "~0.4.1", …
Run Code Online (Sandbox Code Playgroud)

gruntjs yeoman

49
推荐指数
2
解决办法
4万
查看次数

例外安装leksah

用sudo cabal安装leksah安装leksah --global我得到了

7 of 12]编译Text.PrinterParser(src/Text/PrinterParser.hs,dist/build/Text/PrinterParser.o)

src/Text/PrinterParser.hs:230:42:不在范围内:`catch'无法安装ltk-0.8.0.6

这使得无法继续安装.它看起来像一个错误,但我可能是错的.

请注意,我使用ghc 7.6.3和ghc-pkg列表返回:

    Cabal-1.16.0
    GLURaw-1.3.0.0
    GLUT-2.4.0.0
    HTTP-4000.2.8
    HUnit-1.2.5.2
    OpenGL-2.8.0.0
    OpenGLRaw-1.3.0.0
    QuickCheck-2.6
    array-0.4.0.1
    async-2.0.1.4
    attoparsec-0.10.4.0
    base-4.6.0.1
    bin-package-db-0.0.0.0
    binary-0.5.1.1
    binary-shared-0.8.3
    bytestring-0.10.0.2
    cairo-0.12.4
    case-insensitive-1.0.0.1
    cgi-3001.1.7.5
    containers-0.5.0.0
    deepseq-1.3.0.1
    directory-1.2.0.1
    fgl-5.4.2.4
    filepath-1.3.0.1
    ghc-7.6.3
    ghc-paths-0.1.0.9
    ghc-prim-0.3.0.0
    gio-0.12.4
    glade-0.12.1
    glib-0.12.4
    gtk-0.12.4
    gtksourceview2-0.12.3.1
    haddock-2.13.2.1
    hashable-1.1.2.5
    haskell-platform-2013.2.0.0
    haskell-src-1.0.1.5
    haskell2010-1.1.1.0
    haskell98-2.0.0.2
    hoopl-3.9.0.0
    hpc-0.6.0.0
    hslogger-1.2.1
    html-1.0.1.2
    integer-gmp-0.5.0.0
    mtl-2.1.2
    network-2.4.1.2
    old-locale-1.0.0.5
    old-time-1.1.0.1
    pango-0.12.4
    parallel-3.2.0.3
    parsec-3.1.3
    pretty-1.1.1.0
    primitive-0.5.0.1
    process-1.1.0.2
    random-1.0.1.1
    regex-base-0.93.2
    regex-compat-0.95.1
    regex-posix-0.95.2
    regex-tdfa-1.1.8
    rts-1.0
    split-0.2.2
    stm-2.4.2
    syb-0.4.0
    template-haskell-2.8.0.0
    text-0.11.3.1
    time-1.4.0.1
    transformers-0.3.0.0
    unix-2.6.0.1
    unordered-containers-0.2.3.0
    utf8-string-0.3.7
    vector-0.10.0.1 …
Run Code Online (Sandbox Code Playgroud)

haskell leksah

8
推荐指数
1
解决办法
939
查看次数

如何在路线中使用Sinatra URL作为参数?

我正在使用Sinatra路由,如果可能的话,我想解释一个普通的HTTP地址作为路由中的参数:

url http://somesite/blog/archives   
Run Code Online (Sandbox Code Playgroud)

路线是:

/http://somesite/blog/archives 
Run Code Online (Sandbox Code Playgroud)

代码是:

get '/:url' do |u|  
(some code dealing with url)
Run Code Online (Sandbox Code Playgroud)

HTTP URL中的各种"/"正在产生问题.

我找到的解决方法是仅传递上面示例中"somesite"所代表的URL部分,然后使用:

get '/:url' do |u|
buildUrl = "http://#{u}/blog/archives"
(some code dealing with url)
Run Code Online (Sandbox Code Playgroud)

有没有办法直接处理完整的URL?

ruby routes sinatra

3
推荐指数
1
解决办法
3066
查看次数

标签 统计

gruntjs ×1

haskell ×1

leksah ×1

routes ×1

ruby ×1

sinatra ×1

yeoman ×1