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

Uninitialized constant FullcalendarEngine on production (Unicorn + Nginx) #20

Closed Twizty closed 9 years ago

Twizty commented 9 years ago

I'm trying to use fullcalendar engine but i get this error on production server. Has anyone encountered this error?

ehannes commented 9 years ago

What's your error message?

Twizty commented 9 years ago

ERROR -- : uninitialized constant FullcalendarEngine (NameError) /home/rails/config/routes.rb:4:in block in <top (required)>' /usr/local/rvm/gems/ruby-2.1.3/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:ininstance_exec' /usr/local/rvm/gems/ruby-2.1.3/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in eval_block' /usr/local/rvm/gems/ruby-2.1.3/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:401:indraw' /home/rails/config/routes.rb:1:in <top (required)>' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:inblock in load_paths' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in each' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:inload_paths' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:16:in reload!' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/application.rb:169:inreload_routes!' /usr/local/rvm/gems/ruby-2.1.3/gems/devise-3.4.1/lib/devise/rails.rb:14:in block in <class:Engine>' /usr/local/rvm/gems/ruby-2.1.3/gems/activesupport-4.2.0/lib/active_support/lazy_load_hooks.rb:36:incall' /usr/local/rvm/gems/ruby-2.1.3/gems/activesupport-4.2.0/lib/active_support/lazy_load_hooks.rb:36:in execute_hook' /usr/local/rvm/gems/ruby-2.1.3/gems/activesupport-4.2.0/lib/active_support/lazy_load_hooks.rb:45:inblock in run_load_hooks' /usr/local/rvm/gems/ruby-2.1.3/gems/activesupport-4.2.0/lib/active_support/lazy_load_hooks.rb:44:in each' /usr/local/rvm/gems/ruby-2.1.3/gems/activesupport-4.2.0/lib/active_support/lazy_load_hooks.rb:44:inrun_load_hooks' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/application/finisher.rb:55:in block in <module:Finisher>' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/initializable.rb:30:ininstance_exec' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/initializable.rb:30:in run' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/initializable.rb:55:inblock in run_initializers' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:226:in block in tsort_each' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:348:inblock (2 levels) in each_strongly_connected_component' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:427:in each_strongly_connected_component_from' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:347:inblock in each_strongly_connected_component' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in each' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:incall' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in each_strongly_connected_component' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:224:intsort_each' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:205:in tsort_each' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/initializable.rb:54:inrun_initializers' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/application.rb:352:in initialize!' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/railtie.rb:194:inpublic_send' /usr/local/rvm/gems/ruby-2.1.3/gems/railties-4.2.0/lib/rails/railtie.rb:194:in method_missing' /home/rails/config/environment.rb:5:in<top (required)>' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require' /usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire' config.ru:4:in block in <main>' /usr/local/rvm/gems/ruby-2.1.3/gems/rack-1.6.0/lib/rack/builder.rb:55:ininstance_eval' /usr/local/rvm/gems/ruby-2.1.3/gems/rack-1.6.0/lib/rack/builder.rb:55:in initialize' config.ru:1:innew' config.ru:1:in <main>' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn.rb:48:ineval' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn.rb:48:in block in builder' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:incall' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in build_app!' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:628:ininit_worker_process' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:651:in worker_loop' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:inspawn_missing_workers' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:536:in maintain_worker_count' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:294:injoin' /usr/local/rvm/gems/ruby-2.1.3/gems/unicorn-4.8.3/bin/unicorn:126:in <top (required)>' /usr/local/rvm/gems/ruby-2.1.3/bin/unicorn:23:inload' /usr/local/rvm/gems/ruby-2.1.3/bin/unicorn:23:in <main>' /usr/local/rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:ineval' /usr/local/rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `

'

ehannes commented 9 years ago

So what does /home/rails/config/routes.rb:4 say?

Twizty commented 9 years ago

I mount Fullcalendar there.

ehannes commented 9 years ago

And what does the line say? Clearly it's something wrong with what you have written there.

Twizty commented 9 years ago

It works in development mode on my local machine.

ehannes commented 9 years ago

Sound strange. But I still need to know what that line says before I know if I can help or not...

Twizty commented 9 years ago

mount FullcalendarEngine::Engine => "/fullcalendar_engine"

ehannes commented 9 years ago

What does your Gemfile say where you include FullcalendarEngine?

Twizty commented 9 years ago

gem 'fullcalendar_engine'

ehannes commented 9 years ago

You say it's working in development mode but not in production mode and the error is a NameError. It appears as if you have included FullcalendarEngine in development but not in production mode. Are you sure the fullcalendar_engine is it's not in a group in your Gemfile?

Twizty commented 9 years ago

Yes, I'm sure. FullcalendarEngine even works in rails console in production mode.

ehannes commented 9 years ago

When do you get the error message?

Twizty commented 9 years ago

When I run the server, I get 504.

ehannes commented 9 years ago

I tried to deploy my application that is using FullcalendarEngine and I had no problem. Sorry, but I have no further ideas.

aditya-kapoor commented 9 years ago

Hi @Twizty pls make a minimal application along with the steps to reproduce this error. I am giving this issue a close, feel free to reopen it when we have some concrete to move on.