百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

heroku_san

> 开发工具
开源

关于 Heroku 的有用资料

582 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

关于 Heroku 的有用资料

Heroku San

Helpful rake tasks for Heroku.

Install

Rails 3+

Add this to your Gemfile:

ruby
  group :development do
    gem 'heroku_san'
  end

Rails 2

To install add the following to config/environment.rb:

ruby
  config.gem 'heroku_san'

Rake tasks are not automatically loaded from gems, so you’ll need to add the following to your Rakefile:

ruby
  begin
    require 'heroku_san/tasks'
  rescue LoadError
    STDERR.puts "Run `rake gems:install` to install heroku_san"
  end

Sinatra

Update your Gemfile:

ruby
  group :development do
    gem 'heroku_san'
  end

Update your Rakefile:

ruby
  require "bundler/setup"
  begin
    require "heroku_san"
    config_file = File.join(File.expand_path(File.dirname(__FILE__)), 'config', 'heroku.yml')
    HerokuSan.project = HerokuSan::Project.new(config_file, :deploy => HerokuSan::Deploy::Sinatra)
    load "heroku_san/tasks.rb"
  rescue LoadError
    # The gem shouldn't be installed in a production environment
  end

Configure

In config/heroku.yml you will need to add the Heroku apps that you would like to attach to this project. You can generate this file by running:

Rails 3+

bash
  rails generate heroku_san

Everything else

bash
  rake heroku:create_config

Customize the file for your project. If this is a fresh project, heroku_san can create all the applications for you, and set each one's RACK_ENV.

bash
  rake all heroku:create heroku:rack_env

Configure your Heroku apps according to config/heroku.yml by running:

bash
  rake all heroku:config

Usage

After configuring your Heroku apps you can use rake tasks to control the apps.

bash
  rake production deploy

A rake task with the shorthand name of each app is now available and adds that server to the list that subsequent commands will execute on. Because this list is additive, you can easily select which servers to run a command on.

bash
  rake demo staging restart

A special rake task 'all' is created that causes any further commands to execute on all Heroku apps.

bash
  rake all restart

Need to add remotes for each app?

rake all heroku:remotes

A full list of tasks provided:

…

Frequently used tasks are aliased into the global namespace:

ruby
  task :all           => 'heroku:stage:all'
  task :deploy        => 'heroku:deploy'
  task 'deploy:force' => 'heroku:deploy:force'
  task :before_deploy => 'heroku:deploy:before'
  task :after_deploy  => 'heroku:deploy:after'
  task :console       => 'heroku:console'
  task :restart       => 'heroku:restart'
  task :migrate       => 'heroku:db:migrate'
  task :logs          => 'heroku:logs:default'
  task 'logs:tail'    => 'heroku:logs:tail'
  task 'shell'        => 'heroku:shell'

Links

Homepage: http://github.com/fastestforward/heroku_san

Issue Tracker: http://github.com/fastestforward/heroku_san/issues

Contributors

  • Elijah Miller ([email protected])
  • Glenn Roberts ([email protected])
  • Damien Mathieu ([email protected])
  • Matthew Hassfurder ([email protected])
  • Peter Jaros
  • Lee Semel
  • Michael Haddad ([email protected])
  • Les Hill ([email protected])
  • Bryan Ash
  • Barry Hess ([email protected])
  • Ryan Ahearn ([email protected])
  • Jon Wood ([email protected])
  • Mat Schaffer ([email protected])
  • Jonathan Hironaga ([email protected])
  • Ken Mayer ([email protected])
  • Matt Burke (https://github.com/spraints)

License

Copyright (c) 2008-2012 Elijah Miller , released under the MIT license.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubycliherokuheroku-appsrake

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具