nosretep
2012-Mar-02 18:20 UTC
Generating new application creates a few syntactically bad files in Rails 3.2.1
Running "rails new yourapplicationname" creates all the requisite files, however two of them have bad syntax. session_store.rb is: YourApplicationName::Application.config.session_store :cookie_store, key: ''_yourapplicationname_session'' should be: YourApplicationName::Application.config.session_store :cookie_store, :key => ''_yourapplicationname_session'' wrap_parameters.rb is: wrap_parameters format: [:json] should be: wrap_parameters :format => [:json] ruby -v ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0] -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/2R4UkmR2hHUJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2012-Mar-02 18:32 UTC
Re: Generating new application creates a few syntactically bad files in Rails 3.2.1
On Mar 2, 2012, at 1:20 PM, nosretep wrote:> Running "rails new yourapplicationname" creates all the requisite files, however two of them have bad syntax. > > session_store.rb > > is: > YourApplicationName::Application.config.session_store :cookie_store, key: ''_yourapplicationname_session'' > > should be: > YourApplicationName::Application.config.session_store :cookie_store, :key => ''_yourapplicationname_session'' > > > > wrap_parameters.rb > > is: > wrap_parameters format: [:json] > > should be: > wrap_parameters :format => [:json] > > > ruby -v > ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]What version of Ruby gained the new JSON-style hash notation? Is that a 1.9.3 feature? Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Peter Vandenabeele
2012-Mar-02 20:56 UTC
Re: Generating new application creates a few syntactically bad files in Rails 3.2.1
On Fri, Mar 2, 2012 at 7:32 PM, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> > On Mar 2, 2012, at 1:20 PM, nosretep wrote: > >> Running "rails new yourapplicationname" creates all the requisite files, however two of them have bad syntax. >> >> session_store.rb >> >> is: >> YourApplicationName::Application.config.session_store :cookie_store, key: ''_yourapplicationname_session'' >> >> should be: >> YourApplicationName::Application.config.session_store :cookie_store, :key => ''_yourapplicationname_session'' >> >> >> >> wrap_parameters.rb >> >> is: >> wrap_parameters format: [:json] >> >> should be: >> wrap_parameters :format => [:json] >> >> >> ruby -v >> ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0] > > What version of Ruby gained the new JSON-style hash notation? Is that a 1.9.3 feature?Ruby 1.9 has this new hash notation (check Google for "ruby 1.9 new hash notation"). For `rails new`, you can ask for the "old" hash notation with [--old-style-hash] # Force using old style hash (:foo => ''bar'') on Ruby >= 1.9 You might run `rails new -h` to see all options (there are other interesting options there). HTH, Peter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
nosretep
2012-Mar-02 23:27 UTC
Re: Generating new application creates a few syntactically bad files in Rails 3.2.1
It appears to be a 1.9.2 addition. On Friday, March 2, 2012 1:32:00 PM UTC-5, Walter Lee Davis wrote:> > > On Mar 2, 2012, at 1:20 PM, nosretep wrote: > > > Running "rails new yourapplicationname" creates all the requisite files, > however two of them have bad syntax. > > > > session_store.rb > > > > is: > > YourApplicationName::Application.config.session_store :cookie_store, > key: ''_yourapplicationname_session'' > > > > should be: > > YourApplicationName::Application.config.session_store :cookie_store, > :key => ''_yourapplicationname_session'' > > > > > > > > wrap_parameters.rb > > > > is: > > wrap_parameters format: [:json] > > > > should be: > > wrap_parameters :format => [:json] > > > > > > ruby -v > > ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0] > > What version of Ruby gained the new JSON-style hash notation? Is that a > 1.9.3 feature? > > Walter > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/6_Wozi1UhwQJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.