bootstrappers
bootstrappers copied to clipboard
actions.rb:12:in `replace_in_file' (RuntimeError)
Hello xdite! I am reading the book Rails 101 (old version) The bootstrappers gem I installed has some problem that I do not know how to fix.
When I start this command: bootstrappers groupme
It start installing related gem until one problem happened.
I have searched for a long time . I still can not find any solution about this problem.
Here is the error message (While creating the seo_helper.rb gem , the error happened):
.........
create config/initializers/seo_helper.rb
/usr/local/lib/ruby/gems/2.1.0/gems/bootstrappers-4.2.1.1/lib/bootstrappers/actions.rb:12:in replace_in_file': /Application\.routes\.draw do.*end/m not found in config/routes.rb (RuntimeError) from /usr/local/lib/ruby/gems/2.1.0/gems/bootstrappers-4.2.1.1/lib/bootstrappers/app_builder.rb:90:in
remove_routes_comment_lines'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/generators/app_base.rb:133:in build' from /usr/local/lib/ruby/gems/2.1.0/gems/bootstrappers-4.2.1.1/lib/bootstrappers/generators/app_generator.rb:125:in
remove_routes_comment_lines'
from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command'
from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/group.rb:230:in dispatch' from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in
invoke'
from /usr/local/lib/ruby/gems/2.1.0/gems/bootstrappers-4.2.1.1/lib/bootstrappers/generators/app_generator.rb:28:in bootstrappers_customization' from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in
run'
from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/group.rb:230:in
dispatch'
from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in invoke' from /usr/local/lib/ruby/gems/2.1.0/gems/bootstrappers-4.2.1.1/lib/bootstrappers/generators/app_generator.rb:10:in
finish_template'
from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command'
from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in block in invoke_all' from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
each'
from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in map' from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
invoke_all'
from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/group.rb:232:in dispatch' from /usr/local/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
start'
from /usr/local/lib/ruby/gems/2.1.0/gems/bootstrappers-4.2.1.1/bin/bootstrappers:12:in <top (required)>' from /usr/local/bin/bootstrappers:23:in
load'
from /usr/local/bin/bootstrappers:23:in `
i fixed it by this pull request . https://github.com/xdite/bootstrappers/pull/23/files Thanks !