bootstrappers icon indicating copy to clipboard operation
bootstrappers copied to clipboard

actions.rb:12:in `replace_in_file' (RuntimeError)

Open larrywhy opened this issue 10 years ago • 1 comments

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:inremove_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:inremove_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:ininvoke_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:ininvoke' 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:inrun' 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:indispatch' 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:infinish_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:ininvoke_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:ineach' 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:ininvoke_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:instart' 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:inload' from /usr/local/bin/bootstrappers:23:in `

'

larrywhy avatar Oct 28 '14 13:10 larrywhy

i fixed it by this pull request . https://github.com/xdite/bootstrappers/pull/23/files Thanks !

larrywhy avatar Oct 28 '14 13:10 larrywhy