public
anonymous / Gemfile
Created

DivePanda Heroku Error

  • Download Gist
Gemfile
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
source 'http://rubygems.org'
 
# gem 'rails', '3.0.6'
gem 'rails'
# gem 'rake', '0.9.2.2'
gem 'rake'
gem 'fb_graph'
gem 'jquery-rails'
gem 'magic_encoding'
 
group :development do
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'ruby-debug'
end
 
group :production do
gem 'pg'
# gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'thin'
end
 
# Deploy with Capistrano
# gem 'capistrano'
dives_controller.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
class DivesController < ApplicationController
# GET /dives
# GET /dives.xml
def index
@user = User.where(:facebook_id => current_user.identifier).first
@dives = Dive.where(:user_id => @user.id)
 
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @dives }
end
end
 
# GET /dives/1
# GET /dives/1.xml
def show
@dive = Dive.find(params[:id])
 
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @dive }
end
end
 
# GET /dives/new
# GET /dives/new.xml
def new
@dive = Dive.new
@user = User.where(:facebook_id => current_user.identifier).first
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @dive }
end
end
 
# GET /dives/1/edit
def edit
@user = User.where(:facebook_id => current_user.identifier).first
#@user = User.find_by_facebook_id(current_user.identifier)
@dive = Dive.find(params[:id])
end
 
# POST /dives
# POST /dives.xml
def create
#@user = User.where(:facebook_id => current_user.identifier)
    #@dive = @user.dives.create(params[:dive])
    
#@dive = Dive.new(params[:dive])
 
respond_to do |format|
if @dive.save
format.html { redirect_to(@dive, :notice => 'Your Dive was successfully created.') }
format.xml { render :xml => @dive, :status => :created, :location => @dive }
else
format.html { render :action => "new" }
format.xml { render :xml => @dive.errors, :status => :unprocessable_entity }
end
end
end
 
# PUT /dives/1
# PUT /dives/1.xml
def update
@dive = Dive.find(params[:id])
 
respond_to do |format|
if @dive.update_attributes(params[:dive])
format.html { redirect_to(@dive, :notice => 'Dive was successfully updated.') }
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @dive.errors, :status => :unprocessable_entity }
end
end
end
 
# DELETE /dives/1
# DELETE /dives/1.xml
def destroy
@dive = Dive.find(params[:id])
@dive.destroy
 
respond_to do |format|
format.html { redirect_to(dives_url) }
format.xml { head :ok }
end
end
end
production.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
DivePanda::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
 
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
 
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
 
# Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile"
 
# For nginx:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
 
# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
 
# See everything in the log (default is :info)
# config.log_level = :debug
 
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
 
# Use a different cache store in production
# config.cache_store = :mem_cache_store
 
# Disable Rails's static asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = true
 
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
 
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
 
# Enable threaded mode
# config.threadsafe!
 
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
 
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.