我正在进行Rails 2.3到3.2的升级。在此期间,我改变了很多东西。 现在,在打开Web应用程序的主页时,我没有看到任何HTML响应。我已经使用after_filter验证我的控制器确实返回了HTML但Rails没有在响应代码中返回该HTML。 我尝试在调试日志级别运行应用程序,但没有在日志中看到任何相关内容。
有人可以帮我解决这个问题吗?
编辑:我尝试登录ActionDispacther,ActiveSupport,Rack文件,但没有得到任何关于服务器错误的线索。
答案 0 :(得分:1)
确保您的资产正在投放!有些东西导致你的应用程序达到302,所以路由或资产可能正在这样做。
我知道你可能已经看过这个,但是要做一个关于以下内容的清单:
来源:http://www.rails-upgrade-checklist.com/#3.0
访问Rails 3.0
[ ] git checkout -b oh-noes-here-we-goes
[ ] Use the Rails 3.0 upgrade tool RailsCast to overwrite your current application
[ ] Get your Gemfile in order, attempting to load rails console as you go
[ ] Update your ActiveRecord queries to the new syntax
[ ] Loading rails console is a huge deal: Have a {chocolate,whiskey,beers}
[ ] Let's run that test suite. If you're test unit: yay! If you're rspec, upgrade! (probably best to delete spec/helper and rails g rspec:install
[ ] run your javascript tests (hahahahaha omg I know right?!?!!!)
[ ] If your pages load, that means you have a somewhat functioning rails 3.0 application. Commit your changes and get it on heroku for your staff/helpers/friends&family to go to
[ ] Let's talk about Authentication. Don't continue to run acts_as_authenticatable or auth_modules just because its there. My recommendation: replace with devise and send your users a link to reset their password. This is controversial, as your users will know something's up… but: something IS up, you're not as secure as you need to be
[ ] Update your mailers to the new syntax (and add tests to cover this case)
访问Rails 3.2
[ ] upgrade your gem file to 3.2.13
[ ] Add these gems to your Gemfile under a new "assets group"
[ ] Move your public/images to app/assets/images
[ ] Move your public/stylesheets to app/assets/stylesheets
[ ] Move your public/javascripts to app/assets/javascripts
[ ] Go through your stylesheets and look for urls(); if local, replace with image-url() (Sass)
[ ] Remove any layouts that individually call stylesheets and javascripts
[ ] See if your pages start to break open and swallow you whole
[ ] Remove jQuery
[ ] move your JavaScript libs (underscore, etc) to vendor/assets
[ ] build your application.scss and application.js --- don't put code in these files, just require other files (or load the entire tree)
[ ] find the problems when you're loading every CSS and JS on every page --- it's very common and you might need to change your application to be nicer
[ ] Use RailsDiff to identify additional required configuration changes
[ ] commit and push to heroku. do a little dance if it loads. ask for feedback
其他人有另一个问题并使用了Rails gem升级:
How to upgrade Rails app from 2.3.5 to 3.2.x?
如果其他所有方法都失败了,请结帐rbates: