zeroclipboard-rails icon indicating copy to clipboard operation
zeroclipboard-rails copied to clipboard

Sprockets::FileNotFound after installation

Open chrchr opened this issue 10 years ago • 4 comments

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.

chrchr avatar Mar 20 '14 02:03 chrchr

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

osdakira avatar Apr 26 '14 14:04 osdakira

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.

dcromer avatar Apr 23 '15 18:04 dcromer

Adding it in initializers seems to work too.

dearlordylord avatar May 23 '15 14:05 dearlordylord

the "//=require zeroclipboard" needs to be above "//=require tree ."

AaronGoldsmith1 avatar Nov 03 '16 00:11 AaronGoldsmith1