Rails 4.0 RC1

This site is a Rails 4.0 beta site. Obviously it's time for release candidate 1. Mo' production ready, mo' problems.

In development after upgrading when starting the Rails server, the following error came up:

uninitialized constant ActionDispatch::Session::EncryptedCookieStore (NameError)

To be fair, I made this site as a fresh Rails 4 app so I had no upgrade issues. And a fresh Rails 4 RC1 app would also have no problems. The fix to this is to edit the following file:

/config/initializers/session_store.rb

Change:

config.session_store :encrypted_cookie_store

to:

config.session_store :cookie_store

The store gets encrypted automagically. With that complete, I had a routes error show up. When running rake routes or starting the Rails server the error came up:

Invalid route name, already in use: 'page' You may have defined two routes with the same name using the :as option, or you may be overriding a route already defined b y a resource with the same naming. For the latter, you can restrict the routes created with resources as explained here: http://guides.rubyonrails.org/routing.html#restricting-the-routes-created

In my routes I had the RESTful automatically created route for pages:

resources :pages

That created a http://localhost/pages/whatever routing. I wanted a root routing for the show page as all of these pages are to display and I didn't want people going to http://localhost/pages/home to see the home page. Thus this route:

get ':id', to: 'pages#show', as: :page

That as: :page conflicted with the named route automatically created by resources :pages, though I'm not sure how given they go to different locations. Changing as: :page to as: :view worked but not sure that's the ideal fix.

I was not able to change the resources to exclude show by writing resources: :pages, except: [:show] as the conflict still existed. In any case, it's working now.

Comments

Name: Watch Amber's Adventure ( 2005 ) Online HD 1080p

Comment: <p>I&#39;ve always been fascinated by movement, this can be a wonderful source full of some quality forms about them. Done well. Watch Amber&#39;s Adventure ( 2005 ) Online HD 1080p <a href="http://maiksmovie.com/amber&#x27;s-adventure-(-2005-)_487069/">http://maiksmovie.com/amber&#39;s-adventure-(-2005-)_487069/</a></p>

Back
paperclip paperclip