vinsol / fullcalendar-rails-engine

Rails engine implementation of fullcalendar jQuery plugin(http://arshaw.com/fullcalendar/). Create, edit, delete, reschedule, resize events like google calendar.
http://vinsol.com/fullcalendar-demo
MIT License
66 stars 51 forks source link

JQuery UI images cannot be found #26

Open ehannes opened 8 years ago

ehannes commented 8 years ago

When running in production environment and Rails 4, the server cannot find JQuery UI images.

I, [2015-09-10T15:37:04.710074 #6806]  INFO -- : Started GET "/assets/images/ui-bg_diagonals-thick_20_666666_40x40.png" for (ip address) at 2015-09-10 15:37:04 +0200
F, [2015-09-10T15:37:04.710927 #6806] FATAL -- : 
ActionController::RoutingError (No route matches [GET] "/assets/images/ui-bg_diagonals-thick_20_666666_40x40.png"):
  actionpack (4.1.5) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.1.5) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.1.5) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.1.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.1.5) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.1.5) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.1.5) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.5) lib/rack/runtime.rb:17:in `call'
  activesupport (4.1.5) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
  rack (1.5.5) lib/rack/sendfile.rb:112:in `call'
  railties (4.1.5) lib/rails/engine.rb:514:in `call'
  railties (4.1.5) lib/rails/application.rb:144:in `call'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:94:in `process_request'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:111:in `block in create_thread_and_abort_on_exception'

I see you have explicitly declared the image paths in fullcalendar_engine.gemspec with Gem::Specification.files. Is this compatible with Rails 4?

mooreds commented 8 years ago

Would love to know if you ever got this working. I ended up just putting these image assets in an S3 bucket and modifying the CSS to point to that bucket. Just had the variable be set in the environment of the app that the engine is installed in. Kludgy but it works.

See https://github.com/thefoodcorridor/fullcalendar-rails-engine/blob/master/app/assets/stylesheets/fullcalendar_engine/jquery-ui-1.10.3.custom.css.erb