zeroclipboard / zeroclipboard-rails

ZeroClipboard rails gem
http://zeroclipboard.org/
MIT License
125 stars 36 forks source link

Sprockets::FileNotFound after installation #18

Open chrchr opened 10 years ago

chrchr commented 10 years ago

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.

osdakira commented 10 years ago

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
dcromer commented 9 years ago

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.

dearlordylord commented 9 years ago

Adding it in initializers seems to work too.

AaronGoldsmith1 commented 7 years ago

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