2015-03-13 68 views
0

我想正確升級我的Rails應用程序從3.2.12到4.2 ...如何將Rails升級到4.2?

有人給我這個鏈接:http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html

此刻我試圖從升級到3.2.12 4.0。 ...我掛在步驟5.4:

Rails 4.0 no longer supports loading plugins from vendor/plugins. 
You must replace any plugins by extracting them to gems and adding them to your Gemfile. 
If you choose not to make them gems, you can move them into, say, lib/my_plugin/* 
and add an appropriate initializer in config/initializers/my_plugin.rb. 

好了這就是沒有問題,從供應商/插件LIB複製...但我怎麼都成立了初始化? ...

+0

也許這個[**博客文章**](http://matt.coneybeare.me/how-to-convert-simple-rails-23-style-plugins/)可能會有所幫助。 – spickermann 2015-03-13 11:54:17

+0

遵循http://railsapps.github.io/updating-rails.html – 2015-03-13 12:35:43

+1

你將不得不弄清楚特定插件的情況,並編寫一些代碼 - 如果插件是內部的,或者否則不受支持。這不是純粹的機械過程。除了spickermann推薦的博客文章外,我還寫了一篇[這裏](https://bibwild.wordpress.com/2012/04/25/converting-a-more-complex-rails-2 -3樣式的插件 - 非棄用 - 導軌-3-2 /)。在升級到4.0,然後是4.1,然後是4.2,然後升級到3.2.21(最新的3.2.x)之前,您應該嘗試使所有內容在零廢棄警告運行。 – jrochkind 2015-03-13 13:32:51

回答

1

初始化程序是在啓動時執行的普通ruby文件。他們住在config/initializers