Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

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

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.