Skip to content

Instantly share code, notes, and snippets.

@tarky
tarky / Gemfile.lock
Created Nov 7, 2015
wrap_layout doesn't work as the document.
View Gemfile.lock
GEM
remote: http://rubygems.org/
specs:
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
View gist:83bae740a2d132360e1b
a.afilink{
font-weight: bold;
font-size: 150%;
color: #0000ff !important;
text-decoration: underline;
}
a.afilink:visited { color: #000080 !important; }
a.afilink:hover { color: #ff0000 !important; }
a.afilink:active { color: #ff8000 !important; }
View gist:d8caf2997db85ea68f29
script result.log
do something
exit
@tarky
tarky / gist:ce3dd5c0799f9bb6a437
Last active Aug 29, 2015
destory item without user
View gist:ce3dd5c0799f9bb6a437
models = %w(Theme Entry Vote Activity Feed Follow Notification Authentication)
models.each do | model |
model.constantize.all.each do | obj |
if obj.user.nil?
puts "User #{obj.user_id} doesn't exist. So destroy #{model} #{obj.id}"
obj.destroy
end
end
end
Follow.all.each do | obj |
@tarky
tarky / gist:ed97e3ded412a854c73d
Created Jun 23, 2015
Error when deploy on OpsWorks
View gist:ed97e3ded412a854c73d
[2015-06-23T08:08:36+00:00] INFO: Report handlers complete
---
[2015-06-23T08:08:38+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/aws/opsworks/current
One version per cookbook
data_bags at /var/lib/aws/opsworks/data/data_bags
nodes at /var/lib/aws/opsworks/data/nodes
[2015-06-23T08:08:38+00:00] INFO: Forking chef instance to converge...
View gist:c343913082cf6ca615f0
2015-06-23T06:29:40+00:00] INFO: sudo su - deploy -c 'cd /srv/www/inq/releases/20150623062934 && /usr/local/bin/bundle install --path /home/deploy/.bundler/inq --without=test development'
================================================================================
Error executing action `deploy` on resource 'deploy[/srv/www/inq]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '5'
@tarky
tarky / gist:3e201b9b455defeea2a0
Created Jun 22, 2015
Rails admin はなぜか一般ユーザ用のログイン画面が出ちゃう。
View gist:3e201b9b455defeea2a0
Rails admin はなぜか一般ユーザ用のログイン画面が出ちゃう。Rails admin はなぜか一般ユーザ用のログイン画面が出ちゃう。
@tarky
tarky / gist:b76b9f1935085d884665
Created Jun 22, 2015
error when adding activeadmin
View gist:b76b9f1935085d884665
1 || Fetching gem metadata from https://rubygems.org/.........
2 || Fetching version metadata from https://rubygems.org/...
3 || Fetching dependency metadata from https://rubygems.org/..
4 || Resolving dependencies......
5 || Your Gemfile requires gems that depend on each other, creating an infinite loop. Please remove gem 'meta_search' and try again.
y
View gist:5dbceb201cbf1e422293
[2015-06-22T05:07:45+00:00] INFO: sudo su - deploy -c 'cd /srv/www/inq/releases/20150622050739 && /usr/local/bin/bundle install --path /home/deploy/.bundler/inq --without=test development'
================================================================================
Error executing action `deploy` on resource 'deploy[/srv/www/inq]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
View gist:9883382bb5df35362790
https://github.com/pry/pry/issues/1265#issuecomment-76188820
これで治る。