Closed MikeBlyth closed 13 years ago
Indeed you are right. I ve fixed this issue.
Thanks a lot for reporting.
Thanks. I think the gem still needs to be updated ... at least my "gem update" said there were not any changes (yet). --Mike
That s easy to fix.
Using the latest plugin, this file is constantly changing the order of keys in the hashes
--- public/javascripts/active_scaffold/default/date_picker_bridge.js (revision 28815) +++ public/javascripts/active_scaffold/default/date_picker_bridge.js (working copy) @@ -1,10 +1,10 @@ jQuery(function($){ if (typeof($.datepicker) === 'object') {
And why is that an issue?
volker (on 1.9.2) ...:
when going into rails c
the date picker bridge will delete date_picker_bridge.js
via:
FileUtils.rm(File.join(destination, 'date_picker_bridge.js')) if File.exist?(File.join(destination, 'date_picker_bridge.js'))
even with an initializers/active_scaffold.rb set as:
ActiveScaffold.js_framework = :jquery
restores when running rails s
:S
This fixes it:
Gemfile:
gem 'active_scaffold_vho', :git => 'git://github.com/vhochstein/active_scaffold.git', :require => false
gem 'render_component_vho', :git => 'git://github.com/vhochstein/render_component.git'
gem 'recordselect_vho', :git => 'git://github.com/vhochstein/recordselect.git'
gem 'active_scaffold_batch_vho', :git => 'git://github.com/vhochstein/active_scaffold_batch.git', :require => false
gem 'active_scaffold_export_vho', :git => 'git://github.com/RobertLowe/active_scaffold_export.git', :require => false # 1.9.2 fix for csv
gem 'active_scaffold_config_list_vho', :git => 'git://github.com/vhochstein/active_scaffold_config_list.git', :require => false
initalizers/active_record.rb
require 'active_scaffold_vho'
require 'active_scaffold_batch_vho'
require 'active_scaffold_export_vho'
require 'active_scaffold_config_list_vho'
ActiveScaffold.js_framework = :jquery
Hope I ve understood you correctly.
You are basically facing the issue, that active_scaffold initializer will not be executed if running rails c ?
Close, but it's a litte weirder than that
Trying to run my application in Heroku, I get this error
It appears that AS is trying to write date_picker_bridge.js. I have set
in
config/environments/production.rb
. I have verified on my local system, in production mode, thatdate_picker_bridge.js
is re-created when the Rails server starts, unlike the other two script files in that folder. This may be due to line 11 inactive_scaffold/bridges/date_picker
,which perhaps should have
if File.exist?(File.join(destination, 'date_picker_bridge.js'))
as a condition, but I don't know the system well enough to say whether this is the place where the problem is originating.