tors / jquery-fileupload-rails

jQuery File Upload integrated for Rails
669 stars 254 forks source link

uninitialized constant JQuery #39

Closed allenwyma closed 9 years ago

allenwyma commented 11 years ago

I tried to drop this into an initializer, but it gave me uninitialized constant JQuery error, I also tried to drop in

# Add in jQuery middleware for FileUploading
config.middleware.use ::JQuery::FileUpload::Rails::Middleware

But, I still get the same error as above, am I missing something? Should I require a certain file or something? When I run the server with rails s, i dont' get an issue, but capistrano keeps throwing errors when I'm trying to migrate the database or try to reboot the server.

koos303 commented 11 years ago

Did you add the gem into the 'assets' group? If so, middleware cannot access it.

allenwyma commented 11 years ago

So it should be outside of all groups? Will it get automatically included in asset pipeline if outside of assets?

jordanmichaelrushing commented 11 years ago

For anyone reading this later on wondering about this issue, I just had this problem using the console in production and simply moved it out of the assets group and into the main gem area. No issues with dev or production so I think it should be ok. Good luck!