This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
meoooh@vm-3:~/rails/fpage$ rails c | |
Loading development environment (Rails 4.0.0) | |
irb(main):001:0> Page.create_or_update_page_list("CAAERdn67ktcBADjQ2qIiZCzimr1iqrj1ofMZBZCfE673y7IP5ZAsWognVz | |
2qQHVhOTznQTqghwjxDxApnaMoPJVDCrfru4aZCDFZAcBtcyEg8N9okv9qRWDDl3A1UygxYC8VcMxtxAZBRXp1SeiUcJy") | |
NoMethodError: undefined method `future' for #<Class:0x007f0140c01078> | |
from /home/meoooh/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activerecord-4.0.0/lib/active_r | |
ecord/dynamic_matchers.rb:22:in `method_missing' | |
from /home/meoooh/rails/fpage/app/models/page.rb:14:in `block in create_or_update_page_list' | |
from /home/meoooh/rails/fpage/app/models/page.rb:13:in `each' | |
from /home/meoooh/rails/fpage/app/models/page.rb:13:in `create_or_update_page_list' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
meoooh@vm-3:~/rails/fpage$ guard | |
15:26:17 - INFO - Guard here! It looks like your project has a Gemfile, yet you are running | |
> [#] `guard` outside of Bundler. If this is your intent, feel free to ignore this | |
> [#] message. Otherwise, consider using `bundle exec guard` to ensure your | |
> [#] dependencies are loaded correctly. | |
> [#] (You can run `guard` with --no-bundler-warning to get rid of this message.) | |
15:26:18 - INFO - Guard is using TerminalTitle to send notifications. | |
15:26:18 - INFO - Guard::RSpec is running | |
15:26:18 - INFO - Guard is now watching at '/home/meoooh/rails/fpage' | |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Downloading/unpacking django | |
Getting page https://pypi.python.org/simple/django/ | |
URLs to search for versions for django: | |
* https://pypi.python.org/simple/django/ | |
Analyzing links from page https://pypi.python.org/simple/Django/ | |
Found link https://pypi.python.org/packages/source/D/Django/Django-1.2.1.tar.gz#md5=2351efb20f6b7b5d9ce80fa4cb1bd9ca (from https://pypi.python.org/simple/Django/), version: 1.2.1 | |
Found link https://pypi.python.org/packages/source/D/Django/Django-1.2.7.tar.gz#md5=902fe294a2f7b16e5e1dee42d458c2ba (from https://pypi.python.org/simple/Django/), version: 1.2.7 | |
Found link https://pypi.python.org/packages/source/D/Django/Django-1.3.4.tar.gz#md5=9a610a40ee5fcc4ca283fb499e265936 (from https://pypi.python.org/simple/Django/), version: 1.3.4 | |
Skipping link https://pypi.python.org/packages/any/D/Django/Django-1.5.2-py2.py3-none-any.whl#md5=07f0d2d42162945d0ad031fc9737847d (from https://pypi.python.org/simple/Django/); unknown archive format: .whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
han@meoooh:~/rails$ git clone git@github.com:doohee323/vsns.git myproject | |
Cloning into 'myproject'... | |
remote: Counting objects: 2206, done. | |
remote: Compressing objects: 100% (1207/1207), done. | |
remote: Total 2206 (delta 994), reused 2145 (delta 946) | |
Receiving objects: 100% (2206/2206), 5.92 MiB | 2.32 MiB/s, done. | |
Resolving deltas: 100% (994/994), done. | |
han@meoooh:~/rails$ cd myproject/ | |
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too, | |
you can ignore these warnings with 'rvm rvmrc warning ignore /home/han/rails/myproject/Gemfile'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); |