-1

I am doing Rails 2.3 to 3.2 upgrade. During this, I have changed lots of things. Now I don't see any HTML in response while opening homepage of the web app. I have verified using after_filter that my controllers do return HTML but Rails does not return that HTML in response code. I tried running app at debug log level but didn't see anything related in logs.

Can someone please help me solve this problem?

Edit: I tried logging at ActionDispacther, ActiveSupport, Rack files but didn't get any clue of what's wrong with server.

Mike Szyndel
  • 10,461
  • 10
  • 47
  • 63
mohit
  • 1,087
  • 1
  • 9
  • 18
  • 3
    Too little information. – Sergio Tulentsev Sep 06 '14 at 14:06
  • @mohit show your view files please? – uday Sep 06 '14 at 15:00
  • What is the result of `curl -v http://localhost:3000`? – Mike Szyndel Sep 06 '14 at 18:41
  • @MichalSzyndel : curl -vk mhhost:port logs are as follows :: < HTTP/1.1 302 Found < Date: Mon, 08 Sep 2014 09:04:54 GMT < Server: Server < Location: https://XYZ < Content-Length: 457 < Connection: close < Content-Type: text/html; charset=iso-8859-1 302 Found

    Found

    The document has moved here.

    * Closing connection #0 * SSLv3, TLS alert, Client hello (1):
    – mohit Sep 08 '14 at 09:11
  • @mohit show your route.rb, root_url's controller, action and view – RAJ Sep 13 '14 at 20:46

1 Answers1

1

Make sure your assets are being served! Something is causing your app to 302, so maybe the routing or the assets are doing that.

I know you might have already seen this, but do a checklist on the followings:

Source:http://www.rails-upgrade-checklist.com/#3.0

Getting to 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)

Getting to 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

Someone else had another issue and used the Rails gem upgrade:

How to upgrade Rails app from 2.3.5 to 3.2.x?

If all else failed, checkout rbates:

http://railscasts.com/episodes/282-upgrading-to-rails-3-1

Community
  • 1
  • 1
0bserver07
  • 3,390
  • 1
  • 28
  • 56