2012-05-03 Ikezawa
HerokuアプリケーションはDynoごとに分割された環境で実行される。 Dynoの種類(プロセスタイプ)はProcfileで定義される。
web: bundle exec thin -p $PORT -e $RACK_ENV start
clock: clockwork likes.rb
#!/usr/bin/sh | |
make realclean | |
autoconf | |
./configure --prefix=~/tmp/ruby-trunk \ | |
--with-gcc=gcc-4.2 \ | |
--with-arch=x86_64 \ | |
--with-readline-dir=/usr/local \ |
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0] | |
6550.rb:5: [BUG] Segmentation fault | |
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0] | |
-- Control frame information ----------------------------------------------- | |
c:2434 p:0015 s:8509 b:7295 l:0006a8 d:007294 LAMBDA 6550.rb:5 | |
c:2433 p:---- s:7291 b:7291 l:007290 d:007290 FINISH | |
c:2432 p:0015 s:7289 b:7289 l:0006a8 d:007288 LAMBDA 6550.rb:5 | |
c:2431 p:---- s:7285 b:7285 l:007284 d:007284 FINISH | |
c:2430 p:0015 s:7283 b:7283 l:0006a8 d:007282 LAMBDA 6550.rb:5 |
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems ./spec/mspec/bin/mspec run -B ./spec/default.mspec ./spec/rubyspec/core/kernel/global_variables_spec.rb
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems ./spec/mspec/bin/mspec run -B ./spec/default.mspec
ruby 2.0.0dev (2012-10-14 trunk 37179) [x86_64-darwin12.2.0]
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
#!/usr/bin/env bash | |
git clone git://github.com/komagata/lokka.git | |
cd lokka | |
heroku create | |
git push heroku master | |
heroku addons:add heroku-postgresql:dev | |
heroku pg:info | head -n1 | awk '{print $2}' | xargs heroku pg:promote | |
heroku run rake db:setup |
class Hash | |
def deep_clone | |
Marshal.load(Marshal.dump(self)) | |
end | |
end | |
h = {} #=> {} | |
a = {'a' => 1, 'b' => 2, 'c' => h} #=> {"a"=>1, "b"=>2, "c"=>{}} | |
a1 = a.clone #=> {"a"=>1, "b"=>2, "c"=>{}} | |
a2 = a.deep_clone #=> {"a"=>1, "b"=>2, "c"=>{}} |
$ make test-all TESTS='-j 5' | |
CC = gcc | |
LD = ld | |
LDSHARED = gcc -dynamic -bundle | |
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -Werror=extra-tokens -pipe -arch x86_64 | |
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE | |
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin12.3.0 -I./include -I. | |
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-u,_objc_msgSend -pie -arch x86_64 | |
SOLIBS = | |
Using built-in specs. |
$ git diff | |
diff --git a/common.mk b/common.mk | |
index ebcf24e..b82c13e 100644 | |
--- a/common.mk | |
+++ b/common.mk | |
@@ -449,7 +449,6 @@ clean-local:: PHONY | |
$(Q)$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time | |
$(Q)$(RM) y.tab.c y.output encdb.h transdb.h prelude.c config.log rbconfig.rb $(ruby_pc) probes.h probes.$(OBJEXT) probes.stamp ruby-glommed.$(OBJEXT) | |
clean-ext:: PHONY | |
- $(Q)$(RM) $(EXTOUT)/.timestamp/.*.time |
namespace :db do | |
namespace :enable do | |
desc "enable hstore extension" | |
task :hstore => [:environment, :load_config] do | |
ActiveRecord::Base.connection.execute('CREATE EXTENSION IF NOT EXISTS hstore;') | |
end | |
end | |
Rake::Task['db:schema:load'].enhance ['db:enable:hstore'] | |
end |