uninitialized constant Refinery::Videos

15 views
Skip to first unread message

lawrence...@gmail.com

unread,
Mar 18, 2015, 5:11:50 PM3/18/15
to refine...@googlegroups.com
Is there an easy way to get the functionality of the plugins into templates that might not be under the control of Refinery? 

We had RefineryCMS working with the videos plugin installed, and we were able to input videos, and they showed on the page, so everything was great, and then I installed Devise, following this guide:

http://refinerycms.com/edge-guides/with-an-existing-rails-31-devise-app

and now we have this error:

uninitialized constant Refinery::Videos

more details here:

http://krubner.com/rails_error.png

I thought I could fix this by adding Videos to ApplicationController:

class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  include Refinery::AuthenticatedSystem
  include Refinery::Videos 
end

but that only gets me:

uninitialized constant Refinery::Videos


I realize I can write an include statement where needed, but I'm wondering if there is something simpler and more general? Is there an easy way to get the functionality of the plugins into templates that might not be under the control of Refinery?

lawrence...@gmail.com

unread,
Mar 18, 2015, 5:17:35 PM3/18/15
to refine...@googlegroups.com
Oddly enough, on my own machine, this runs without a problem. When I upload to Amazon, I get an error.

bundle exec rails s
=> Booting WEBrick
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
[2015-03-18 17:15:20] INFO  WEBrick 1.3.1
[2015-03-18 17:15:20] INFO  ruby 2.1.5 (2014-11-13) [x86_64-darwin11.0]
[2015-03-18 17:15:20] INFO  WEBrick::HTTPServer#start: pid=58084 port=3000


Started GET "/education/library" for 127.0.0.1 at 2015-03-18 17:15:36 -0400

  ActiveRecord::SchemaMigration Load (0.5ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Processing by EducationController#library as HTML

  Refinery::Videos::Video Load (8.5ms)  SELECT "refinery_videos".* FROM "refinery_videos"

  Rendered education/library.html.erb within layouts/application (34.5ms)

  Rendered vendor/bundle/ruby/2.1.0/bundler/gems/refinerycms-11f8d1eeb45e/core/app/views/refinery/_html_tag.html.erb (1.3ms)

  Rendered refinery/_site_bar.html.erb (8.7ms)

  Rendered _login.html.erb (0.9ms)

Completed 200 OK in 2709ms (Views: 172.5ms | ActiveRecord: 8.5ms)

lawrence...@gmail.com

unread,
Mar 18, 2015, 5:21:29 PM3/18/15
to refine...@googlegroups.com
Sorry, I am an idiot. I only needed to reboot Unicorn.
Reply all
Reply to author
Forward
0 new messages