小编xSl*_*lok的帖子

运行Rails应用程序时出错

我是Ruby on Rails的新手,我正在学习使用Angular,但在我运行"gem install rack-cors"后,当我尝试启动rails应用程序时,我不断收到此错误:

C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch/middleware/stack.rb:35:in `build': undefined method `new' for "Rack::Cors":String (NoMethodError)
Did you mean?  next
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch/middleware/stack.rb:99:in `block in build'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch/middleware/stack.rb:99:in `each'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch/middleware/stack.rb:99:in `inject'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/actionpack-5.1.1/lib/action_dispatch/middleware/stack.rb:99:in `build'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/engine.rb:508:in `block in app'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/engine.rb:504:in `synchronize'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/engine.rb:504:in `app'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/application/finisher.rb:45:in `block in <module:Finisher>'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `instance_exec'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `run'
        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/initializable.rb:59:in `block in run_initializers'
        from C:/Ruby23-x64/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
        from C:/Ruby23-x64/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from C:/Ruby23-x64/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from C:/Ruby23-x64/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from C:/Ruby23-x64/lib/ruby/2.3.0/tsort.rb:347:in …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails ruby-on-rails-5

6
推荐指数
1
解决办法
3225
查看次数

Grails - Jasper 插件依赖下载错误

我正在尝试为 grails 下载 jasper 插件,但是如果我将依赖项放在我的 build.gradle 中,我会不断收到此错误:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Eventos Unipar'.
> Could not resolve all dependencies for configuration ':runtime'.
   > Could not find org.olap4j:olap4j:0.9.7.309-JS-3.
     Searched in the following locations:
         file:/C:/Users/xSlok/.m2/repository/org/olap4j/olap4j/0.9.7.309-JS-3/olap4j-0.9.7.309-JS-3.pom
         file:/C:/Users/xSlok/.m2/repository/org/olap4j/olap4j/0.9.7.309-JS-3/olap4j-0.9.7.309-JS-3.jar
         http://repo.grails.org/grails/repo/org/olap4j/olap4j/0.9.7.309-JS-3/olap4j-0.9.7.309-JS-3.pom
         http://repo.grails.org/grails/repo/org/olap4j/olap4j/0.9.7.309-JS-3/olap4j-0.9.7.309-JS-3.jar
     Required by:
         eventosunipar:Eventos Unipar:0.1 > org.grails.plugins:jasper:1.11.0 > net.sf.jasperreports:jasperreports:5.6.1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output
Run Code Online (Sandbox Code Playgroud)

我使用的依赖是

compile …
Run Code Online (Sandbox Code Playgroud)

java grails maven

4
推荐指数
1
解决办法
3746
查看次数

标签 统计

grails ×1

java ×1

maven ×1

ruby ×1

ruby-on-rails ×1

ruby-on-rails-5 ×1