-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: adding rake tasks to engine #42
Comments
Checkout #39 |
@cj, @onemanstartup You can do the following in your spec = Gem::Specification.find_by_name 'bower-rails'
load "#{spec.gem_dir}/lib/tasks/bower.rake" Then try |
@SergeyKishenin thanks, now i have rake tasks, but they only work on dummy app. even when I call tasks like |
Does |
Yes. I've inserted like this spec = Gem::Specification.find_by_name 'bower-rails'
load "#{spec.gem_dir}/lib/tasks/bower.rake"
Bundler::GemHelper.install_tasks
APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
load 'rails/tasks/engine.rake' then i have |
Well, I'm not sure what's wrong with your engine. I've just tried the same and all was fine. My engine's #!/usr/bin/env rake
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'bower-rails'
spec = Gem::Specification.find_by_name 'bower-rails'
load "#{spec.gem_dir}/lib/tasks/bower.rake"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
$ rake -T
rake bower:install # Install components from bower
rake bower:install:force # Install components with -F option
rake bower:list # List bower components
rake bower:update # Update bower components
rake bower:update:prune # Update existing components and uninstalls extraneous components
rake build # Build xxx-0.2.3.gem into the pkg directory
rake install # Build and install xxx-0.2.3.gem into system gems
rake release # Create tag v0.2.3 and build and push xxx-0.2.3.gem to Rubygems
rake spec # Run RSpec code examples My engine's Just to test I've created So make sure you have everything all right! Good luck :) |
You don't have APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
load 'rails/tasks/engine.rake' https://github.com/rails/docrails/blob/master/railties/lib/rails/tasks/engine.rake - this file load dummy rails and your rake task set root to that dummy app |
Are you sure that dummy's |
It is default behaviour, when you generate mountable engine |
Yes, I see now. Let me check out. PS: по-русски тут неформат немного :) |
Check out the edge version |
Now I have this issue # Bowerfile
assets_path "assets/javascript"
# Puts files under ./lib/assets/javascript/components
group :lib, :assets_path => "assets/js" do
asset "jquery"
end
// generated bower.json
{
"name": "dsl-generated dependencies",
"dependencies": {
"jquery": "latest"
}
} |
Fixed with 8465b06 |
It's working, thanks. |
When I'm add bower-rails to engine there is no rake tasks.
The text was updated successfully, but these errors were encountered: