Skip to content

Instantly share code, notes, and snippets.

View meoooh's full-sized avatar

han meoooh

  • 뉴비 주식회사
View GitHub Profile
han@meoooh:~/rails/vsns$ heroku logs
2013-09-10T03:40:47.314767+00:00 app[web.1]:
2013-09-10T03:40:47.314767+00:00 app[web.1]: ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "items" does not exist
2013-09-10T03:40:47.314767+00:00 app[web.1]: LINE 1: SELECT "items".* FROM "items" ORDER BY "items"."updated_a...
2013-09-10T03:40:47.314767+00:00 app[web.1]: ^
2013-09-10T03:40:47.314538+00:00 app[web.1]: 5: <!--To apply bottom-less pagination using pageless jQuery plugin-->
2013-09-10T03:40:47.314952+00:00 app[web.1]: 3: </div>
2013-09-10T03:40:47.314767+00:00 app[web.1]: 2: <%= render @items %>
2013-09-10T03:40:47.314767+00:00 app[web.1]: 1: <div id="items">
2013-09-10T03:40:47.314952+00:00 app[web.1]: 5: <!--To apply bottom-less pagination using pageless jQuery plugin-->
han@meoooh:~/rails/vsns$ RAILS_ENV=production rake assets:precompile
rake aborted!
undefined local variable or method `config' for main:Object
/home/han/rails/vsns/config/application.rb:29:in `<top (required)>'
/home/han/rails/vsns/Rakefile:4:in `require'
/home/han/rails/vsns/Rakefile:4:in `<top (required)>'
/home/han/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/home/han/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)
han@meoooh:~/rails/vsns$ RAILS_ENV=production rake assets:precompile --trace
han@meoooh:~/rails/vsns$ heroku logs
2013-09-09T04:12:51.420600+00:00 heroku[api]: Enable Logplex by hgk617@naver.com
2013-09-09T04:12:51.443079+00:00 heroku[api]: Release v2 created by hgk617@naver.com
2013-09-09T04:14:41+00:00 heroku[slug-compiler]: Slug compilation started
2013-09-09T04:17:08.541765+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=han-rails-vsns.herokuapp.com fwd="112.175.135.112" dyno= connect= service= status=502 bytes=
2013-09-09T04:17:08.860414+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=han-rails-vsns.herokuapp.com fwd="112.175.135.112" dyno= connect= service= status=502 bytes=
2013-09-09T04:18:47+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby/Rails app
2013-09-09T04:20:14.429255+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=han-rails-vsns.herokuapp.com fwd="112.175.135.112" dyno= connect= service= status=502 bytes=
2013-09-09T04:20:15+00:00 hero
han@meoooh:~/rails/vsns$ git push heroku master
Counting objects: 2002, done.
Compressing objects: 100% (1009/1009), done.
Writing objects: 100% (2002/2002), 5.82 MiB | 857 KiB/s, done.
Total 2002 (delta 961), reused 1977 (delta 943)
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
#POST /posts/:id/like
#POST /posts/1/like
def like
if @post = Post.where(id: params[:id]) #일단 POST 모델을 가져옴...
if @like = LikePost.where(user_id: current_user.id, post_id: @post.id).empty? #그다음 LikePost모델에 현재 post_id와 user_id를 검색하여 비었을때(empty)는 좋아요(like)
@like = LikePost.new(user_id: current_user.id, post_id: @post.id) # 현재 post와 현재 user로 새로운 포스트 작성
if @like.save
redirect_to @post
else
<?php
$id = $_GET['id'];
$pw = $_GET['pw'];
$sql = "select id, pwdcompare('$pw', pw) as pw
from user
where user = '$id'"; //pwdcompare(): http://msdn.microsoft.com/ko-kr/library/dd822792.aspx
$result = mssql_query($sql);
$row=mssql_fetch_array($result);
Looking up host 'repang.net'...
Host 'repang.net' resolved to 14.63.162.188.
Connecting to 14.63.162.188:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-13-virtual x86_64)
* Documentation: https://help.ubuntu.com/
New release 'oneiric' available.
meoooh@194f16a7-973d-4e96-80eb-31393b20e3f4:~$ wget http://ipip.kr
--2013-06-03 01:19:46-- http://ipip.kr/
Resolving ipip.kr... 211.189.88.59
Connecting to ipip.kr|211.189.88.59|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `index.html.1'
[ <=> ] 30,877 --.-K/s in 0.006s
meoooh@ubuntu:~$ cd myFirstRails/
meoooh@ubuntu:~/myFirstRails$ ll
total 88
drwxr-xr-x 13 meoooh meoooh 4096 Jun 2 09:14 ./
drwxr-xr-x 7 meoooh meoooh 4096 Jun 2 09:14 ../
drwxrwxr-x 8 meoooh meoooh 4096 Jun 2 09:14 app/
-rw-rw-r-- 1 meoooh meoooh 167 Jun 2 09:14 Capfile
drwxrwxr-x 5 meoooh meoooh 4096 Jun 2 09:14 config/
-rw-rw-r-- 1 meoooh meoooh 162 Jun 2 09:14 config.ru
drwxrwxr-x 2 meoooh meoooh 4096 Jun 2 09:14 db/
$ cap deploy:setup
* 2013-06-02 09:07:14 executing `deploy:setup'
* executing "mkdir -p /home/meoooh/myFirstRails /home/meoooh/myFirstRails/releases /home/meoooh/myFirstRails/shared /home/meoooh/myFirstRails/shared/system /home/meoooh/myFirstRails/shared/log /home/meoooh/myFirstRails/shared/pids"
servers: ["14.63.162.188"]
Password:
[14.63.162.188] executing command
command finished in 53ms
* executing "chmod g+w /home/meoooh/myFirstRails /home/meoooh/myFirstRails/releases /home/meoooh/myFirstRails/shared /home/meoooh/myFirstRails/shared/system /home/meoooh/myFirstRails/shared/log /home/meoooh/myFirstRails/shared/pids"
servers: ["14.63.162.188"]
[14.63.162.188] executing command