zeroclipboard-rails
zeroclipboard-rails copied to clipboard
Sprockets::FileNotFound after installation
This is likely just because I am not super up-to-speed on the asset pipeline, but when I follow the instructions in the README for my Rails 3.2.17 app, things don't work.
I've added zeroclipboard-rails to my Gemfile. I run bundle
I add to application.js:
//= require zeroclipboard
And i get file not found loading the page:
couldn't find file 'zeroclipboard'
(in /Users/rc/work/app/app/assets/javascripts/application.js:17)
The swf file is in public/assets but, indeed, there's no zeroclipboard.js in the project at all.
I had same error on rspec. My problem was environment settings (:group) in Gemfile.
group :development do
gem 'zeroclipboard-rails'
end
When I added :test
environment, it was solved.
group :development, :test do
gem 'zeroclipboard-rails'
end
I encountered this error while including this gem within another Rails 4 engine. I resolved it by including
require 'zeroclipboard-rails`
in my engine's base class.
Adding it in initializers seems to work too.
the "//=require zeroclipboard" needs to be above "//=require tree ."