Skip to content

Instantly share code, notes, and snippets.

@Prevole
Created August 21, 2012 07:35
Show Gist options
  • Save Prevole/3413141 to your computer and use it in GitHub Desktop.
Save Prevole/3413141 to your computer and use it in GitHub Desktop.
Rails plugin with only assets
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "backbone-bundle/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "backbone-bundle"
s.version = BackboneBundle::VERSION
s.authors = ["Prevole"]
s.email = ["realemailthere"]
s.homepage = "someurlthere"
s.summary = "Toolbox of different piece of backbone codes."
s.description = "Contains the different useful javascript files for backbone."
s.files = Dir["{lib,vendor}/**/*"]
s.files.reject! { |fn| fn.include? "lib/tasks" }
s.test_files = Dir["test/**/*"]
s.require_paths = ["lib"]
s.add_dependency "rails", "~> 3.2.6"
end
require "backbone-bundle/version"
require "backbone-bundle/engine"
module BackboneBundle
class Engine < ::Rails::Engine
end
end
module BackboneBundle
VERSION = "0.0.1"
end
#= require backbone # Working
#= require backbone.layoutmanager # Not working, Error: the file is not found
# ...
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'backbone-on-rails'
gem 'backbone-bundle'
gem 'haml_coffee_assets'
gem 'execjs'
gem 'i18n-js'
end
# ...
// The javascript code of backbone/layoutmanager extension that is probably not relevant for my problem
@Prevole
Copy link
Author

Prevole commented Aug 21, 2012

The real error I got when I try to access any page that require application.coffee/js in my main project:

Sprockets::FileNotFound in …

couldn't find file 'backbone.layoutmanager'

@Prevole
Copy link
Author

Prevole commented Aug 21, 2012

Thans to Radar on the #rubyonrails. The solution was really simple. Just restarted the rails server and it worked. Newbie error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment