0
我在寶石文件中使用gem 'rich', GitHub: 'bastiaanterhorst/rich'
, 運行包安裝後,當我跑rails generate rich:install
我收到提示此未定義的方法'新」的‘機架:: RawUpload’:字符串
> /home/anand/.rvm/gems/ruby-2.3.1/gems/actionpack-5.1.3/lib/action_dispatch/middleware/stack.rb:35:in
> `build': undefined method `new' for "Rack::RawUpload":String Did you
> mean? next (NoMethodError) from
> /home/anand/.rvm/gems/ruby-2.3.1/gems/actionpack-5.1.3/lib/action_dispatch/middleware/stack.rb:99:in
> `block in build' from
> /home/anand/.rvm/gems/ruby-2.3.1/gems/actionpack-5.1.3/lib/action_dispatch/middleware/stack.rb:99:in
> `each' from
> /home/anand/.rvm/gems/ruby-2.3.1/gems/actionpack-5.1.3/lib/action_dispatch/middleware/stack.rb:99:in
> `inject' from
> /home/anand/.rvm/gems/ruby-2.3.1/gems/actionpack-5.1.3/lib/action_dispatch/middleware/stack.rb:99:in
> `build' from
> /home/anand/.rvm/gems/ruby-2.3.1/gems/railties-5.1.3/lib/rails/engine.rb:508:in
> `block in app' from
> /home/anand/.rvm/gems/ruby-2.3.1/gems/railties-5.1.3/lib/rails/engine.rb:504:in
> `synchronize' from
> /home/anand/.rvm/gems/ruby-2.3.1/gems/railties-5.1.3/lib/rails/engine.rb:504:in
> `app' from
> /home/anand/.rvm/gems/ruby-2.3.1/gems/railties-5.1.3/lib/rails/application/finisher.rb:45:in
> `block in <module:Finisher>' from
> /home/anand/.rvm/gems/ruby-2.3.1/gems/railties-5.1.3/lib/rails/initializable.rb:30:in
> `instance_exec'
我沒有得到解決這個
> undefined method `new' for "Rack::RawUpload":String
但是我也嘗試寶石'rack-raw-upload', :git => 'git://github.com/tb/rack-raw-upload.git'
但仍得到相同的錯誤。
嗨,你沒有明白我的觀點。讓我再解釋一下。 1 - 加入'寶石 '富', '〜「1.4',「> = 1.4.5'' 2 - 束安裝 3 -rails產生豐富:運行步驟即時得到錯誤 '/後這裏安裝 。 rvm/gems/ruby-2.3.1/gems/actionpack-5.1.3/lib/action_dispatch/middleware/stack.rb:35:在'build'中:未定義的方法'new'爲「Rack :: RawUpload」:String' – Gabbar