:: Don't use ECHO OFF to avoid possible change of ECHO
:: Use SETLOCAL so variables set in the script are not persisted
@SETLOCAL
:: Add bundled ruby version to the PATH, use HerokuPath as starting point
@SET HEROKU_RUBY="C:\Ruby200\bin"
@SET PATH=%HEROKU_RUBY%;%PATH%
:: Invoke 'heroku' (the calling script) as argument to ruby.
:: Also forward all the arguments provided to it.
@ruby.exe "%~dpn0" %*
「C:\Program Files\Heroku\bin\heroku」の3行目
#!/bin/sh
# find embedded ruby relative to script
bindir=`cd -P "C:\Ruby200\bin" 2>/dev/null; pwd`
exec "$bindir/ruby" -x "$0" "$@"
#!/usr/bin/env ruby
# encoding: UTF-8
# resolve bin path, ignoring symlinks
require "pathname"
bin_file = Pathname.new(__FILE__).realpath
# add locally vendored gems to libpath
gem_dir = File.expand_path("../../vendor/gems", bin_file)
Dir["#{gem_dir}/**/lib"].each do |libdir|
$:.unshift libdir
end
# add self to libpath
$:.unshift File.expand_path("../../lib", bin_file)
# inject any code in ~/.heroku/client over top
require "heroku/updater"
Heroku::Updater.inject_libpath
# start up the CLI
require "heroku/cli"
Heroku.user_agent = "heroku/toolbelt/#{Heroku::VERSION} (#{RUBY_PLATFORM}) ruby/#{RUBY_VERSION}"
Heroku::CLI.start(*ARGV)
C:>heroku login
DL is deprecated, please use Fiddle
Enter your Heroku credentials.
Email: アカウント登録したメールアドレス
Password (typing will be hidden): パスワード(非表示)
Could not find an existing public key.
Would you like to generate one? [Yn] y
Generating new SSH public key.
Uploading SSH public key C:/Users/[ユーザー]/.ssh/id_rsa.pub... done
Authentication successful.
C:>heroku addons:add heroku-postgresql:dev
DL is deprecated, please use Fiddle
Adding heroku-postgresql:dev on sample-lokka... done, v5 (free)
Attached as HEROKU_POSTGRESQL_BLACK_URL
Database has been created and is available
! This database is empty. If upgrading, you can transfer
! data from another database with pgbackups:restore.
Use `heroku addons:docs heroku-postgresql:dev` to view documentation.
C:>heroku pg:promote HEROKU_POSTGRESQL_BLACK_URL
C:>heroku rake db:setup
C:>heroku open
C:>heroku run rake db:setup
Running `rake db:setup` attached to terminal... up, run.1
rake aborted!
+options+ should be Hash or Addressable::URI or String, but was NilClass
(See full trace by running task with --trace)
コメント