Re: [Rails] 3.2.13 breaks localized ActiveScaffold assets compilation
I managed to typo that line! For some weird reason it worked, but I noticed an error in a project that uses packaged gems... Of course there should not be a ">=" inside the tag! The correct declaration is: gem "active_scaffold", :git => "git:// github.com/activescaffold/active_scaffold.git", :tag => "v3.3.0.rc3" On Tuesday, 19 March 2013 15:59:07 UTC+9, Yves-Eric wrote: > > Hi Jeffrey, > > > Awesome, that fixed it, thanks! > > > For anyone facing this issue, the fix is not released yet, so "bundle > update active_scaffold" won't do. You need this: > > gem "active_scaffold", :git => "git:// > github.com/activescaffold/active_scaffold.git", :tag => ">= v3.3.0.rc3" > > > Thanks again, > Yves-Eric > > > On Tuesday, 19 March 2013 12:08:33 UTC+9, Jeffrey Jones wrote: >> >> Actually after a bit of research it looks like this was fixed in the >> below commit >> >> >> https://github.com/activescaffold/active_scaffold/commit/2536a29a1d21469278c95b7f2a87deba14040be6 >> >> >> to fix this issue >> >> https://github.com/activescaffold/active_scaffold/issues/249 >> >> Cheers >> >> Jeff >> >> On 19/03/13 11:58, Yves-Eric wrote: >> > Hi, >> > >> > >> > I just tried upgrading to 3.2.13 a project that worked fine under >> 3.2.12, >> > but that broke our assets pipeline compilation. It looks like >> compilation >> > now chokes on ActiveScaffold asset 'date_picker_bridge.js.erb'. >> > (Full stack trace below). >> > >> > The first line of that file is: >> > >> > <%= ActiveScaffold::Bridges[:date_picker].localization %> >> > >> > And we use Japanese locale. >> > >> > >> > >> > How can we fix this? >> > >> > >> > Thank you, >> > Yves-Eric >> > >> > >> > >> > $ rake --trace assets:precompile >> > ** Invoke assets:precompile (first_time) >> > ** Execute assets:precompile >> > /Users/DEV/.rvm/rubies/ruby-1.9.3-p327-perf/bin/ruby ./bin/rake >> > assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace >> > ** Invoke assets:precompile:all (first_time) >> > ** Invoke assets:cache:clean (first_time) >> > ** Invoke assets:environment (first_time) >> > ** Execute assets:environment >> > ** Invoke environment (first_time)>' >> > ** Execute environment >> > ** Execute assets:cache:clean >> > ** Execute assets:precompile:all >> > rake aborted! >> > invalid byte sequence in US-ASCII >> > (in >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/bundler/gems/active_scaffold-2053b21e43e6/app/assets/javascripts/jquery/date_picker_bridge.js.erb) >> >> >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/safety_colons.rb:20:in >> >> >> > `evaluate' >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/tilt-1.3.6/lib/tilt/template.rb:77:in >> >> >> > `render' >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in >> >> >> > `block in evaluate' >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in >> >> >> > `each' >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in >> >> >> > `evaluate' >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/unprocessed_asset.rb:14:in >> >> >> > `initialize' >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in >> >> >> > `new' >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in >> >> >> > `block in build_asset' >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in >> >> >> > `circular_call_protection' >> > >> /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overr
Re: [Rails] 3.2.13 breaks localized ActiveScaffold assets compilation
Hi Jeffrey, Awesome, that fixed it, thanks! For anyone facing this issue, the fix is not released yet, so "bundle update active_scaffold" won't do. You need this: gem "active_scaffold", :git => "git://github.com/activescaffold/active_scaffold.git", :tag => ">= v3.3.0.rc3" Thanks again, Yves-Eric On Tuesday, 19 March 2013 12:08:33 UTC+9, Jeffrey Jones wrote: > > Actually after a bit of research it looks like this was fixed in the > below commit > > > https://github.com/activescaffold/active_scaffold/commit/2536a29a1d21469278c95b7f2a87deba14040be6 > > > to fix this issue > > https://github.com/activescaffold/active_scaffold/issues/249 > > Cheers > > Jeff > > On 19/03/13 11:58, Yves-Eric wrote: > > Hi, > > > > > > I just tried upgrading to 3.2.13 a project that worked fine under > 3.2.12, > > but that broke our assets pipeline compilation. It looks like > compilation > > now chokes on ActiveScaffold asset 'date_picker_bridge.js.erb'. > > (Full stack trace below). > > > > The first line of that file is: > > > > <%= ActiveScaffold::Bridges[:date_picker].localization %> > > > > And we use Japanese locale. > > > > > > > > How can we fix this? > > > > > > Thank you, > > Yves-Eric > > > > > > > > $ rake --trace assets:precompile > > ** Invoke assets:precompile (first_time) > > ** Execute assets:precompile > > /Users/DEV/.rvm/rubies/ruby-1.9.3-p327-perf/bin/ruby ./bin/rake > > assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace > > ** Invoke assets:precompile:all (first_time) > > ** Invoke assets:cache:clean (first_time) > > ** Invoke assets:environment (first_time) > > ** Execute assets:environment > > ** Invoke environment (first_time)>' > > ** Execute environment > > ** Execute assets:cache:clean > > ** Execute assets:precompile:all > > rake aborted! > > invalid byte sequence in US-ASCII > > (in > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/bundler/gems/active_scaffold-2053b21e43e6/app/assets/javascripts/jquery/date_picker_bridge.js.erb) > > > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/safety_colons.rb:20:in > > > > `evaluate' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/tilt-1.3.6/lib/tilt/template.rb:77:in > > > > `render' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in > > > > `block in evaluate' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in > > > > `each' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in > > > > `evaluate' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/unprocessed_asset.rb:14:in > > > > `initialize' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in > > > > `new' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in > > > > `block in build_asset' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in > > > > `circular_call_protection' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:14:in > > > > `build_asset' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in > > > > `block in build_asset' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in > > > > `cache_asset' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in > > > > `build_asset' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in > > > > `find_asset' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/index.rb:14:in > > > > `find_asset' > > > /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sproc
[Rails] 3.2.13 breaks localized ActiveScaffold assets compilation
Hi, I just tried upgrading to 3.2.13 a project that worked fine under 3.2.12, but that broke our assets pipeline compilation. It looks like compilation now chokes on ActiveScaffold asset 'date_picker_bridge.js.erb'. (Full stack trace below). The first line of that file is: <%= ActiveScaffold::Bridges[:date_picker].localization %> And we use Japanese locale. How can we fix this? Thank you, Yves-Eric $ rake --trace assets:precompile ** Invoke assets:precompile (first_time) ** Execute assets:precompile /Users/DEV/.rvm/rubies/ruby-1.9.3-p327-perf/bin/ruby ./bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace ** Invoke assets:precompile:all (first_time) ** Invoke assets:cache:clean (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment ** Invoke environment (first_time)>' ** Execute environment ** Execute assets:cache:clean ** Execute assets:precompile:all rake aborted! invalid byte sequence in US-ASCII (in /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/bundler/gems/active_scaffold-2053b21e43e6/app/assets/javascripts/jquery/date_picker_bridge.js.erb) /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/safety_colons.rb:20:in `evaluate' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/tilt-1.3.6/lib/tilt/template.rb:77:in `render' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `each' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `evaluate' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/unprocessed_asset.rb:14:in `initialize' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in `new' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in `block in build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in `circular_call_protection' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:14:in `build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/index.rb:14:in `find_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:91:in `block in build_required_assets' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:85:in `each' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:85:in `build_required_assets' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/unprocessed_asset.rb:27:in `initialize' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in `new' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:16:in `block in build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in `circular_call_protection' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/base.rb:14:in `build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/turbo-sprockets/sprockets_overrides/index.rb:14:in `find_asset' /Users/DEV/.rvm/gems/ruby-1.9.3-p327-perf/gems/turbo-sprockets-rails3-0.3.6/lib/sprockets/asset_with_dependencies.rb:91:in `block in build_required_assets'
[Rails] Re: Potential fix to broken session_options in Rails 2.3
スクルト神守 wrote: > hello Martin, Please forgive my terrible english. > > I tried your mokye patch, > but it didn't work well. Yes, I just found out myself the patch is only a partial solution: it worked on my simple prototype, but once integrated into my production system, it stopped working. Like you, I found that "load session" was happening before "set option". The problem is that the session is automatically loaded as soon as something tries to use it. So if some plugin uses the session before your controller gets control, then the session will be loaded before your before_filter can set the options correctly. What you can do to find the culprit: use the ruby debugger and add a "debugger" statement inside the load_session monkey patch function, then run your server with "script/server --debugger". When you try to access you site, your console will drop into the debugger, and you can issue a "where" command, that will give you a stack trace, so you can find out what triggered the call to load_session. In my case, it was the render_component plugin. Unfortunately, I do need the render_component plugin (for my admin pages that use ActiveScaffold)... So, the problem is still open... Can anyone help? Should I fill a bug report? -- Yves-Eric Martin -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Potential fix to broken session_options in Rails 2.3
Hi all, Reviving this old thread with a I am developing a site that needs to be accessible to mobile phones, and I am having issues with session tracking. While the default "cookie_only" session tracking makes a lot of sense (it prevents session fixation attacks), there are these cases when your clients do not support cookies (say, many mobile phones, for example) and you just need to do request-parameter-based session tracking. One should be able to use the "cookie_only" session option and set it to "false" where appropriate, but this is seriously broken in Rails 2.3. >From my tests so far: 1) Setting a default by adding "config.action_controller.session = {:cookie_only => false}" in environment.rb DOES work. 2) Inside your controller (say, a before_filter method), "request.session_options[:cookie_only] = false" to false will NOT work. Unfortunately, 1) is not an acceptable solution, as it opens the whole site to session fixation attacks. FWIW, I think I have traced down the culprit to the load_session method in active_store.rb around line 165: sid = request.cooki...@key] unless @cookie_only sid ||= request.para...@key] end This code becomes a problem in 2.3, because the session has been pushed down to the Rack middleware layer, where your abstract_store gets initialized once and for all, way before any of your controller code gets executed. As a result, your abstract_store's @cookie_only and @key are set once and for all, according to the default session options. Any further changes to the session_options[:cookie_only] or session_options[:key] will simply be ignored. Here is a tentative monkey patch that restores the proper functionality of session_options[:cookie_only] and session_options[:key]. HTH. ### # Monkey patch to allow per-controller/action setting of :cookie_only # and :key session options ### module ActionController module Session class AbstractStore private def load_session(env) request = Rack::Request.new(env) key = request.session_options[:key] cookie_only = request.session_options[:cookie_only] sid = request.cookies[key] unless cookie_only sid ||= request.params[key] end sid, session = get_session(env, sid) [sid, session] end end end end -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Can u visit rubyonrails.org
It just looks like somebody forgot to renew the domain name. Until this gets resolved, could someone please post here the IP(s) of the rubyonrails.org server(s) so that we can temporarily put them in our host files? Thank you. -- Yves-Eric On Apr 23, 1:23 pm, Phlip wrote: > Jack Zhan wrote: > > When I visit rubyonrails.org, it comes up with an ads page. What's > > wrong? > > It's been poached. The system sucks, as usual! > > -- > Phlip > http://flea.sourceforge.net/resume.html --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---