小编ale*_*aio的帖子

Rails中"媒体/媒体"的多元化和单一化(变形)5

我正在使用Rails 5,我刚刚Media使用脚手架工具创建了一个模型.

rails g scaffold media name:string
Run Code Online (Sandbox Code Playgroud)

我有不同的名字和路线和视图等...

在此输入图像描述

这是不正确的多元化,所以当我rake routes得到medium意想不到的路线,因此我在视图中遇到了不同的问题.

在此输入图像描述

当我尝试使用时,<%= form_for @media do ..我抱怨了no method media_index_path.

我怎样才能解决它并且运行良好?

在此先感谢您的帮助.

ruby inflection pluralize singular ruby-on-rails-5

5
推荐指数
2
解决办法
944
查看次数

Rails 4:如何使用RVM在Ubuntu 14.04上添加环境变量?

现在我正在尝试将我的Ruby on Rails应用程序部署到运行Ubuntu的Windows Azure上的虚拟机,但我可以修复de set环境变量错误,如下所述.

我已经为我.bashrc和现在添加了变量, /etc/environment但错误是相同的:

App 1227 stderr: [ 2015-10-06 04:10:57.3814 1352/0x9020d38(Worker 1) utils.rb:86 ]: *** Exception RuntimeError in Rack application object (Missing `secret_to$
App 1227 stderr: from /home/deploy/apps/matching_people/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:534:in `validate_secret_$
App 1227 stderr:        from /home/deploy/apps/matching_people/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:246:in `env_config'
App 1227 stderr:        from /home/deploy/apps/matching_people/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:514:in `call'
App 1227 stderr:        from /home/deploy/apps/matching_people/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:165:in `call'
App 1227 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:94:in `process_request'
App 1227 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:151:in `accept_and_process_next_request'
App 1227 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:112:in `main_loop'
App 1227 stderr:        from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in `block (3 levels) in …
Run Code Online (Sandbox Code Playgroud)

capistrano passenger nginx ruby-on-rails-4 ubuntu-14.04

2
推荐指数
1
解决办法
2518
查看次数