Wednesday, 7 August 2013

Heroku errors [was working yesterday]

Heroku errors [was working yesterday]

I keep getting these error's in the heroku logs every time I've tried to
deploy today. The app was working fine last night, I'm not sure what's
changed since then since I haven't done anything new.
song_controller.rb
class SongsController < ApplicationController
before_filter :authenticate_user!, only: [:create ,:edit, :update,
:destroy, :vote_for_song]
before_action :set_song, only: [:show, :edit, :update, :destroy,
:vote_for_song]
def extract_video
@song = Song.find(params[:id])
@song.YouTubeAddy.extract_video_id
end
def vote_for
@song = Song.find(params[:id])
current_user.vote_for(@song)
@song.plusminus = @song.votes_for
@song.save
respond_to do |format|
format.js { render 'update_votes' }
end
end
def vote_against
@song = Song.find(params[:id])
current_user.vote_against(@song)
respond_to do |format|
format.js { render 'update_votes' }
end
end
def new_songs
@songs = Song.order("id DESC").paginate(:page => params[:page],
:per_page => 15)
get_last_song
end
# GET /Songs
# GET /Songs.json
def index
if params[:query].present?
@songs = Song.search(params)
get_last_song
elsif params[:genre]
@songs = Song.tagged_with(params[:genre]).paginate(:page =>
params[:page], :per_page => 15)
get_last_song
else
@songs = Song.order('id').order('plusminus desc nulls
last').paginate(:page => params[:page], :per_page => 15)
#@songs = Song.tally.paginate(:page => params[:page], :per_page => 15)
get_last_song
end
end
def get_last_song
if params[:page].nil?
@last_song = 0
else
@last_song = 15 * (params[:page].to_i - 1)
end
end
# GET /Songs/1
# GET /Songs/1.json
def show
@comment = Comment.new(song: @song)
@video_tag = YouTubeAddy.extract_video_id(@song.url)
end
# GET /Songs/new
def new
@song = Song.new
end
# GET /Songs/1/edit
def edit
end
# POST /Songs
# POST /Songs.json
def create
@song = Song.new(song_params)
respond_to do |format|
if @song.save
format.html { redirect_to @song, notice: 'Song was successfully
created.' }
format.json { render action: 'show', status: :created, location:
@song }
else
format.html { render action: 'new' }
format.json { render json: @song.errors, status:
:unprocessable_entity }
end
end
end
# PATCH/PUT /Songs/1
# PATCH/PUT /Songs/1.json
def update
respond_to do |format|
if @song.update(song_params)
format.html { redirect_to @song, notice: 'Song was successfully
updated.' }
format.json { head :no_content }
else
format.html { render action: 'edit' }
format.json { render json: @song.errors, status:
:unprocessable_entity }
end
end
end
# Song /Songs/1
# Song /Songs/1.json
def destroy
@song.destroy
respond_to do |format|
format.html { redirect_to songs_url }
format.json { head :no_content }
end
end
private
def set_song
@song = Song.find(params[:id])
end
def song_params
params.require(:song).permit(:title, :artist, :url, :track,
:user_id, :tag_list, :query, :genre, :page)
end
end
song.rb
class Song < ActiveRecord::Base
acts_as_voteable
index_name BONSAI_INDEX_NAME
belongs_to :user
has_many :comments, :dependent => :destroy
has_many :genre_songs
has_many :genres, through: :genre_songs
has_attached_file :track
# :url => "/assets/songs/:id/:style/:basename.:extension",
# :path =>
":rails_root/public/assets/songs/:id/:style/:basename.:extension"
# validates_attachment :track, :presence => true
validates_presence_of :url
validates :title, length: { minimum: 10 }
validates :url, length: { maximum: 300 }
validates :url, :format => URI::regexp(%w(http https))
include Tire::Model::Search
include Tire::Model::Callbacks
def self.search(params)
tire.search(load: true, page: params[:page], per_page: 15) do
query { string params[:query], default_operator: "AND" } if
params[:query].present?
end
end
def to_indexed_json
to_json(methods: [:genre_names])
end
def genre_names
genres.map{ |g| g.name}
end
def self.tagged_with(name)
Genre.find_by_name!(name).songs
end
def tag_list
genres.map(&:name).join(", ")
end
def tag_list=(names)
self.genres = names.split(",").map do |n|
Genre.where(name: n.strip).first_or_create!
end
end
end
Heroku error:
2013-08-07T19:15:49.605667+00:00 app[web.1]: Errno::ECONNREFUSED
(Connection refused - connect(2)):
2013-08-07T19:15:49.605667+00:00 app[web.1]: F,
[2013-08-07T19:15:49.604633 #2] FATAL -- :
2013-08-07T19:15:49.605667+00:00 app[web.1]:
app/controllers/songs_controller.rb:83:in `block in create'
2013-08-07T19:15:49.605667+00:00 app[web.1]:
2013-08-07T19:15:49.605667+00:00 app[web.1]:
app/controllers/songs_controller.rb:82:in `create'
2013-08-07T19:15:49.605667+00:00 app[web.1]:
2013-08-07T19:15:49.620779+00:00 heroku[router]: at=info method=POST
path=/songs host=www.leapfm.com fwd="99.233.170.104" dyno=web.1
connect=7ms service=110ms status=500 bytes=1266
2013-08-07T19:15:50.961877+00:00 app[web.1]: I,
[2013-08-07T19:15:50.960892 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:15:50 +0000
2013-08-07T19:15:50.961877+00:00 app[web.1]: I,
[2013-08-07T19:15:50.960969 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:15:50 +0000
2013-08-07T19:15:51.205225+00:00 app[web.1]: I,
[2013-08-07T19:15:51.204965 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:15:51 +0000
2013-08-07T19:15:51.205557+00:00 app[web.1]: I,
[2013-08-07T19:15:51.205085 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:15:51 +0000
2013-08-07T19:15:52.238897+00:00 app[web.1]: I,
[2013-08-07T19:15:52.238382 #2] INFO -- : Started GET "/" for
99.233.170.104 at 2013-08-07 19:15:52 +0000
2013-08-07T19:15:52.238897+00:00 app[web.1]: I,
[2013-08-07T19:15:52.238263 #2] INFO -- : Started GET "/" for
99.233.170.104 at 2013-08-07 19:15:52 +0000
2013-08-07T19:15:53.160649+00:00 heroku[router]: at=info method=GET path=/
host=www.leapfm.com fwd="99.233.170.104" dyno=web.1 connect=1ms
service=946ms status=304 bytes=0
2013-08-07T19:15:51.101241+00:00 heroku[router]: at=info method=GET
path=/songs/new host=www.leapfm.com fwd="99.233.170.104" dyno=web.1
connect=1ms service=150ms status=304 bytes=0
2013-08-07T19:15:51.226571+00:00 heroku[router]: at=info method=GET
path=/songs/new host=www.leapfm.com fwd="99.233.170.104" dyno=web.1
connect=1ms service=25ms status=304 bytes=0
2013-08-07T19:17:41.768371+00:00 app[web.1]: I,
[2013-08-07T19:17:41.768252 #2] INFO -- : Started GET "/songs/24" for
72.5.89.102 at 2013-08-07 19:17:41 +0000
2013-08-07T19:17:41.781821+00:00 app[web.1]: F,
[2013-08-07T19:17:41.781602 #2] FATAL -- :
2013-08-07T19:17:41.781821+00:00 app[web.1]:
2013-08-07T19:17:41.781821+00:00 app[web.1]:
2013-08-07T19:17:41.781821+00:00 app[web.1]: F,
[2013-08-07T19:17:41.781666 #2] FATAL -- :
2013-08-07T19:17:41.768371+00:00 app[web.1]: I,
[2013-08-07T19:17:41.768179 #2] INFO -- : Started GET "/songs/24" for
72.5.89.102 at 2013-08-07 19:17:41 +0000
2013-08-07T19:17:41.781821+00:00 app[web.1]: ActiveRecord::RecordNotFound
(Couldn't find Song with id=24):
2013-08-07T19:17:41.781821+00:00 app[web.1]:
app/controllers/songs_controller.rb:120:in `set_song'
2013-08-07T19:17:41.781821+00:00 app[web.1]: ActiveRecord::RecordNotFound
(Couldn't find Song with id=24):
2013-08-07T19:17:41.781821+00:00 app[web.1]:
app/controllers/songs_controller.rb:120:in `set_song'
2013-08-07T19:17:41.781821+00:00 app[web.1]:
2013-08-07T19:17:41.781821+00:00 app[web.1]:
2013-08-07T19:17:41.783602+00:00 heroku[router]: at=info method=GET
path=/songs/24 host=www.leapfm.com fwd="72.5.89.102" dyno=web.1
connect=1ms service=18ms status=404 bytes=1351
2013-08-07T19:17:51.531175+00:00 heroku[router]: at=info method=GET
path=/songs/22 host=www.leapfm.com fwd="72.5.89.102" dyno=web.1
connect=24ms service=13ms status=404 bytes=1351
2013-08-07T19:17:51.527635+00:00 app[web.1]: F,
[2013-08-07T19:17:51.527521 #2] FATAL -- :
2013-08-07T19:17:51.527635+00:00 app[web.1]: ActiveRecord::RecordNotFound
(Couldn't find Song with id=22):
2013-08-07T19:17:51.527635+00:00 app[web.1]:
2013-08-07T19:17:51.527635+00:00 app[web.1]: ActiveRecord::RecordNotFound
(Couldn't find Song with id=22):
2013-08-07T19:17:51.527635+00:00 app[web.1]:
2013-08-07T19:17:51.527635+00:00 app[web.1]:
2013-08-07T19:17:51.520041+00:00 app[web.1]: I,
[2013-08-07T19:17:51.519900 #2] INFO -- : Started GET "/songs/22" for
72.5.89.102 at 2013-08-07 19:17:51 +0000
2013-08-07T19:17:51.527635+00:00 app[web.1]: F,
[2013-08-07T19:17:51.527580 #2] FATAL -- :
2013-08-07T19:17:51.520041+00:00 app[web.1]: I,
[2013-08-07T19:17:51.519981 #2] INFO -- : Started GET "/songs/22" for
72.5.89.102 at 2013-08-07 19:17:51 +0000
2013-08-07T19:17:51.527635+00:00 app[web.1]:
2013-08-07T19:17:51.527635+00:00 app[web.1]:
app/controllers/songs_controller.rb:120:in `set_song'
2013-08-07T19:17:51.527635+00:00 app[web.1]:
app/controllers/songs_controller.rb:120:in `set_song'
2013-08-07T19:17:41.941652+00:00 heroku[router]: at=info method=GET
path=/favicon.ico host=www.leapfm.com fwd="72.5.89.102" dyno=web.1
connect=3ms service=7ms status=200 bytes=1150
2013-08-07T19:20:25+00:00 heroku[slug-compiler]: Slug compilation started
2013-08-07T19:20:53+00:00 heroku[slug-compiler]: Slug compilation failed:
failed to compile Ruby/Rails app
2013-08-07T19:21:06.944824+00:00 app[web.1]: I,
[2013-08-07T19:21:06.944800 #2] INFO -- : Started GET "/" for
99.233.170.104 at 2013-08-07 19:21:06 +0000
2013-08-07T19:21:06.944824+00:00 app[web.1]: I,
[2013-08-07T19:21:06.944653 #2] INFO -- : Started GET "/" for
99.233.170.104 at 2013-08-07 19:21:06 +0000
2013-08-07T19:21:07.729567+00:00 heroku[router]: at=info method=GET path=/
host=www.leapfm.com fwd="99.233.170.104" dyno=web.1 connect=1ms
service=788ms status=200 bytes=16824
2013-08-07T19:21:08.662411+00:00 app[web.1]: I,
[2013-08-07T19:21:08.662322 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:08 +0000
2013-08-07T19:21:08.662109+00:00 app[web.1]: I,
[2013-08-07T19:21:08.661914 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:08 +0000
2013-08-07T19:21:08.693731+00:00 heroku[router]: at=info method=GET
path=/songs/new host=www.leapfm.com fwd="99.233.170.104" dyno=web.1
connect=1ms service=37ms status=304 bytes=0
2013-08-07T19:21:16.681196+00:00 app[web.1]: app/models/song.rb:28:in
`search'
2013-08-07T19:21:16.670635+00:00 app[web.1]: I,
[2013-08-07T19:21:16.670450 #2] INFO -- : Started GET
"/songs?utf8=%E2%9C%93&query=rap" for 99.233.170.104 at 2013-08-07
19:21:16 +0000
2013-08-07T19:21:16.681196+00:00 app[web.1]: Errno::ECONNREFUSED
(Connection refused - connect(2)):
2013-08-07T19:21:16.681196+00:00 app[web.1]: F,
[2013-08-07T19:21:16.680957 #2] FATAL -- :
2013-08-07T19:21:16.681196+00:00 app[web.1]:
app/controllers/songs_controller.rb:40:in `index'
2013-08-07T19:21:16.681196+00:00 app[web.1]: app/models/song.rb:28:in
`search'
2013-08-07T19:21:16.681196+00:00 app[web.1]:
2013-08-07T19:21:16.681196+00:00 app[web.1]: F,
[2013-08-07T19:21:16.681232 #2] FATAL -- :
2013-08-07T19:21:16.670635+00:00 app[web.1]: I,
[2013-08-07T19:21:16.670529 #2] INFO -- : Started GET
"/songs?utf8=%E2%9C%93&query=rap" for 99.233.170.104 at 2013-08-07
19:21:16 +0000
2013-08-07T19:21:16.681196+00:00 app[web.1]: Errno::ECONNREFUSED
(Connection refused - connect(2)):
2013-08-07T19:21:16.681558+00:00 app[web.1]:
2013-08-07T19:21:16.681196+00:00 app[web.1]:
2013-08-07T19:21:16.681196+00:00 app[web.1]:
app/controllers/songs_controller.rb:40:in `index'
2013-08-07T19:21:16.681558+00:00 app[web.1]:
2013-08-07T19:21:16.682976+00:00 heroku[router]: at=info method=GET
path=/songs?utf8=%E2%9C%93&query=rap host=www.leapfm.com
fwd="99.233.170.104" dyno=web.1 connect=1ms service=18ms status=500
bytes=1266
2013-08-07T19:21:18.432260+00:00 app[web.1]: I,
[2013-08-07T19:21:18.432084 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:18 +0000
2013-08-07T19:21:18.432260+00:00 app[web.1]: I,
[2013-08-07T19:21:18.432152 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:18 +0000
2013-08-07T19:21:18.570424+00:00 app[web.1]: I,
[2013-08-07T19:21:18.570365 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:18 +0000
2013-08-07T19:21:18.570424+00:00 app[web.1]: I,
[2013-08-07T19:21:18.570284 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:18 +0000
2013-08-07T19:21:18.588940+00:00 heroku[router]: at=info method=GET
path=/songs/new host=www.leapfm.com fwd="99.233.170.104" dyno=web.1
connect=1ms service=23ms status=304 bytes=0
2013-08-07T19:21:19.180263+00:00 app[web.1]: I,
[2013-08-07T19:21:19.180071 #2] INFO -- : Started GET "/" for
99.233.170.104 at 2013-08-07 19:21:19 +0000
2013-08-07T19:21:19.180263+00:00 app[web.1]: I,
[2013-08-07T19:21:19.180206 #2] INFO -- : Started GET "/" for
99.233.170.104 at 2013-08-07 19:21:19 +0000
2013-08-07T19:21:19.306188+00:00 heroku[router]: at=info method=GET path=/
host=www.leapfm.com fwd="99.233.170.104" dyno=web.1 connect=2ms
service=129ms status=304 bytes=0
2013-08-07T19:21:21.621162+00:00 app[web.1]: I,
[2013-08-07T19:21:21.620791 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:21 +0000
2013-08-07T19:21:21.621329+00:00 app[web.1]: I,
[2013-08-07T19:21:21.621249 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:21 +0000
2013-08-07T19:21:21.662741+00:00 heroku[router]: at=info method=GET
path=/songs/new host=www.leapfm.com fwd="99.233.170.104" dyno=web.1
connect=7ms service=84ms status=304 bytes=0
2013-08-07T19:21:32.663205+00:00 app[web.1]: I,
[2013-08-07T19:21:32.662947 #2] INFO -- : Started POST "/songs" for
99.233.170.104 at 2013-08-07 19:21:32 +0000
2013-08-07T19:21:32.663205+00:00 app[web.1]: I,
[2013-08-07T19:21:32.663020 #2] INFO -- : Started POST "/songs" for
99.233.170.104 at 2013-08-07 19:21:32 +0000
2013-08-07T19:21:32.687381+00:00 app[web.1]: F,
[2013-08-07T19:21:32.687254 #2] FATAL -- :
2013-08-07T19:21:32.687381+00:00 app[web.1]:
2013-08-07T19:21:32.687381+00:00 app[web.1]: Errno::ECONNREFUSED
(Connection refused - connect(2)):
2013-08-07T19:21:32.687381+00:00 app[web.1]:
app/controllers/songs_controller.rb:83:in `block in create'
2013-08-07T19:21:32.687381+00:00 app[web.1]:
app/controllers/songs_controller.rb:82:in `create'
2013-08-07T19:21:32.687381+00:00 app[web.1]: F,
[2013-08-07T19:21:32.687331 #2] FATAL -- :
2013-08-07T19:21:32.694312+00:00 heroku[router]: at=info method=POST
path=/songs host=www.leapfm.com fwd="99.233.170.104" dyno=web.1
connect=3ms service=35ms status=500 bytes=1266
2013-08-07T19:21:32.687381+00:00 app[web.1]: Errno::ECONNREFUSED
(Connection refused - connect(2)):
2013-08-07T19:21:32.687381+00:00 app[web.1]:
app/controllers/songs_controller.rb:82:in `create'
2013-08-07T19:21:32.687381+00:00 app[web.1]:
2013-08-07T19:21:32.687594+00:00 app[web.1]:
2013-08-07T19:21:32.687594+00:00 app[web.1]:
2013-08-07T19:21:32.687381+00:00 app[web.1]:
app/controllers/songs_controller.rb:83:in `block in create'
2013-08-07T19:21:33.899946+00:00 app[web.1]: I,
[2013-08-07T19:21:33.899807 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:33 +0000
2013-08-07T19:21:33.899946+00:00 app[web.1]: I,
[2013-08-07T19:21:33.899873 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:33 +0000
2013-08-07T19:21:33.932207+00:00 heroku[router]: at=info method=GET
path=/songs/new host=www.leapfm.com fwd="99.233.170.104" dyno=web.1
connect=6ms service=34ms status=304 bytes=0
2013-08-07T19:21:34.088186+00:00 app[web.1]: I,
[2013-08-07T19:21:34.088036 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:34 +0000
2013-08-07T19:21:34.088186+00:00 app[web.1]: I,
[2013-08-07T19:21:34.088107 #2] INFO -- : Started GET "/songs/new" for
99.233.170.104 at 2013-08-07 19:21:34 +0000
2013-08-07T19:21:34.112443+00:00 heroku[router]: at=info method=GET
path=/songs/new host=www.leapfm.com fwd="99.233.170.104" dyno=web.1
connect=1ms service=27ms status=304 bytes=0
2013-08-07T19:21:35.045241+00:00 app[web.1]: I,
[2013-08-07T19:21:35.045104 #2] INFO -- : Started GET "/" for
99.233.170.104 at 2013-08-07 19:21:35 +0000
2013-08-07T19:21:35.045241+00:00 app[web.1]: I,
[2013-08-07T19:21:35.045177 #2] INFO -- : Started GET "/" for
99.233.170.104 at 2013-08-07 19:21:35 +0000
2013-08-07T19:21:35.183418+00:00 heroku[router]: at=info method=GET path=/
host=www.leapfm.com fwd="99.233.170.104" dyno=web.1 connect=2ms
service=143ms status=304 bytes=0

No comments:

Post a Comment