Look into inclusion of ice_cube and recurring_select in Gemfile #851

Closed
augustf opened this Issue Jan 23, 2014 · 7 comments

Projects

None yet

4 participants

@augustf
Concerto Digital Signage member

Currently, the ice_cube and recurring_select gems are in the main Concerto Gemfile, as Marvin had problems if they were only included in the scheduling gemspec (2ad061a#commitcomment-5156646).

Aside from sorting that out for reasons of cleanliness, Marvin points out that we may need these gems anyway should #576 not be implemented as a plugin.

Either way, we need to make sure that gems that are dependencies of our plugins work straight from the gemspec.

@zr2d2 zr2d2 was assigned Jan 25, 2014
@augustf
Concerto Digital Signage member

Upon trying this out for myself, I found that not including those 2 gems in the Gemfile silently broke the whole application (no pages loaded and no errors were recorded by webserver or application).

Steps:
1) Pull a fresh copy of concerto (no DB either)
2) Remove recurring_select and icecube from Gemfile
3) Run bundle install --path=vendor/bundle
4) Try to load app in browser

@augustf
Concerto Digital Signage member

Turns out the blank page owes to the recurring_select lines in application.css and application.js in the asset pipeline.

@mfrederickson
Concerto Digital Signage member

Yeah, because if you remove the gems, you have to remove the code that initializes them also. That makes sense to me. I mention what you have to do to remove that code in that thread you mentioned earlier.

@augustf
Concerto Digital Signage member

Ok-I think I follow you. I got all stuck trying to include this asset stuff in the gem - which really makes probably makes #875 duplicative. But going forward, we definitely have to clean up the errors that including this in the gem creates, as having Concerto load the dependencies of a plugin directly isn't the way to go.

@augustf augustf referenced this issue in concerto-addons/concerto_template_scheduling Feb 3, 2014
Closed

Sprockets::FileNotFound in Concerto_template_scheduling/schedules#new #10

@augustf augustf assigned mikldt and unassigned zr2d2 and mikldt Feb 13, 2014
@mikldt mikldt self-assigned this Feb 13, 2014
@mikldt
Concerto Digital Signage member

Looks like the issue here is that the recurring_select engine being included from a gem instead of the Gemfile caused Rails' magical gem-finding to miss the fact that it was an engine. As a result, its initializers and assets did not get loaded.

A simple fix is to add require 'recurring_select' as the first line of the engine.rb. More info here - http://bibwild.wordpress.com/2013/02/27/gem-depends-on-rails-engine-gem-gotcha-need-explicit-require/

I tested this out on a local copy, moving the asset includes lines from Concerto to the plugin, and adding the asset tag to the form. Things seemed to work smoothly after that. (Actually, that recurring_select popup is very nice!)

@mfrederickson - could you try this fix on the plugin?

@mfrederickson
Concerto Digital Signage member

@mikldt thank you for figuring this out. I'll test it once #866 is merged in.

@augustf
Concerto Digital Signage member

I've tested a modified template scheduling gem on my box and everything seems to work well.

@augustf augustf added a commit to concerto-addons/concerto_template_scheduling that referenced this issue Feb 14, 2014
@augustf augustf Resolved #10 and concerto/concerto#851 by adding the recurring select…
… call to engine.rb
543ba6d
@augustf augustf added a commit that referenced this issue Feb 14, 2014
@augustf augustf Fixing #851 - removing icecube and reccuring_select references from m…
…ain Gemfile and minimizing default plugins to avoid unexpected dependencies during runtime
fb766b4
@augustf augustf closed this Feb 14, 2014
@zr2d2 zr2d2 added a commit that referenced this issue Feb 15, 2014
@zr2d2 zr2d2 Merge branch 'refs/heads/master' into attribute_names
* refs/heads/master: (187 commits)
  Revert "Moved configuration to Concerto admin settings"
  Revert "Revert "For users without both postgres and mysql installed, be a little more intelligent about the related gems""
  Revert "For users without both postgres and mysql installed, be a little more intelligent about the related gems"
  Moved configuration to Concerto admin settings
  For users without both postgres and mysql installed, be a little more intelligent about the related gems
  Fixing #851 - removing icecube and reccuring_select references from main Gemfile and minimizing default plugins to avoid unexpected dependencies during runtime
  upgrade some gems, keep clockwork at 0.7.0
  Bring Gemfile.lock up to date
  Revert back to https for rubygems source (oops!)
  Don't support platforms bundler doesn't know about
  requested move to further up in Gemfile
  Added Gemfile.local to make it easier to install unicorn
  Whilst we have no tests for it, this would have been sure to fail under 1.8
  Found the proper classname to query-but obviously only under newer rubies
  Add conditional for 0 days for keeping activity logs
  Update 02-concerto_config.rb
  Added Activity model, ConcertoConfig entry, and cron entry to achieve #871
  Add translation to close #867
  add redacting of user's name from activity log
  add bundler version requirement
  ...
2983efd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment