Ruby on rails 将Rails应用程序模板CD制作为root用户并运行bundle命令?

Ruby on rails 将Rails应用程序模板CD制作为root用户并运行bundle命令?,ruby-on-rails,ruby,thor,Ruby On Rails,Ruby,Thor,我相信你会欣赏这种尝试:我想改进Rails3.2中的应用程序模板脚本 我做一些类似的事情 rails新APPNAME-m path/to/template.rb 我想更新脚本以允许我将cd放入新的应用程序中,这样我就可以运行bundle exec命令 比如说, if compass = yes?("Would you like to install Compass and Susy?") gem_group :assets do gem 'compass-rails' gem 'compas

我相信你会欣赏这种尝试:我想改进Rails3.2中的应用程序模板脚本

我做一些类似的事情
rails新APPNAME-m path/to/template.rb

我想更新脚本以允许我将
cd
放入新的应用程序中,这样我就可以运行
bundle exec命令

比如说,

if compass = yes?("Would you like to install Compass and Susy?")
gem_group :assets do
 gem 'compass-rails'
 gem 'compass-susy-plugin'
end

     if compass == true
      run "bundle install"
      inside "#{Rails.application.class.parent_name}" do
        run "bundle exec compass install susy"
       end
 end
end
当我运行上述代码时,会出现如下错误-

unexpected keyword_do_block (SyntaxError)
  /home/rhodee/GitRepos/dotfiles/workflow.rb:103: syntax error, unexpected keyword_end,   expecting $end

感谢您启用我的lazy。

您应该能够删除“内部”并简单地执行

run "bundle exec compass install susy"
要在目录中实际移动并执行某些操作,您可以:

run "cd #{Rails.application.class.parent_name}/public; rm index.html"

(当然,您可以运行上面的“rm public/index.html”,但这不是重点。)

我将对此进行升级,因为脚本似乎存在安装问题。谢谢