Created
May 8, 2012 02:16
-
-
Save anonymous/2632041 to your computer and use it in GitHub Desktop.
DivePanda Heroku Error
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
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 |
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
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' |
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
GEM | |
remote: http://rubygems.org/ | |
specs: | |
actionmailer (3.2.3) | |
actionpack (= 3.2.3) | |
mail (~> 2.4.4) | |
actionpack (3.2.3) | |
activemodel (= 3.2.3) | |
activesupport (= 3.2.3) | |
builder (~> 3.0.0) | |
erubis (~> 2.7.0) | |
journey (~> 1.0.1) | |
rack (~> 1.4.0) | |
rack-cache (~> 1.2) | |
rack-test (~> 0.6.1) | |
sprockets (~> 2.1.2) | |
activemodel (3.2.3) | |
activesupport (= 3.2.3) | |
builder (~> 3.0.0) | |
activerecord (3.2.3) | |
activemodel (= 3.2.3) | |
activesupport (= 3.2.3) | |
arel (~> 3.0.2) | |
tzinfo (~> 0.3.29) | |
activeresource (3.2.3) | |
activemodel (= 3.2.3) | |
activesupport (= 3.2.3) | |
activesupport (3.2.3) | |
i18n (~> 0.6) | |
multi_json (~> 1.0) | |
arel (3.0.2) | |
attr_required (0.0.5) | |
builder (3.0.0) | |
columnize (0.3.6) | |
daemons (1.1.8) | |
erubis (2.7.0) | |
eventmachine (0.12.10) | |
fb_graph (2.4.12) | |
httpclient (>= 2.2.0.2) | |
rack-oauth2 (>= 0.14.4) | |
tzinfo | |
hike (1.2.1) | |
httpclient (2.2.5) | |
i18n (0.6.0) | |
journey (1.0.3) | |
jquery-rails (2.0.2) | |
railties (>= 3.2.0, < 5.0) | |
thor (~> 0.14) | |
json (1.7.1) | |
linecache (0.46) | |
rbx-require-relative (> 0.0.4) | |
magic_encoding (0.0.2) | |
mail (2.4.4) | |
i18n (>= 0.4.0) | |
mime-types (~> 1.16) | |
treetop (~> 1.4.8) | |
mime-types (1.18) | |
multi_json (1.3.4) | |
polyglot (0.3.3) | |
rack (1.4.1) | |
rack-cache (1.2) | |
rack (>= 0.4) | |
rack-oauth2 (0.14.4) | |
activesupport (>= 2.3) | |
attr_required (>= 0.0.5) | |
httpclient (>= 2.2.0.2) | |
i18n | |
json (>= 1.4.3) | |
rack (>= 1.1) | |
rack-ssl (1.3.2) | |
rack | |
rack-test (0.6.1) | |
rack (>= 1.0) | |
rails (3.2.3) | |
actionmailer (= 3.2.3) | |
actionpack (= 3.2.3) | |
activerecord (= 3.2.3) | |
activeresource (= 3.2.3) | |
activesupport (= 3.2.3) | |
bundler (~> 1.0) | |
railties (= 3.2.3) | |
railties (3.2.3) | |
actionpack (= 3.2.3) | |
activesupport (= 3.2.3) | |
rack-ssl (~> 1.3.2) | |
rake (>= 0.8.7) | |
rdoc (~> 3.4) | |
thor (~> 0.14.6) | |
rake (0.9.2.2) | |
rbx-require-relative (0.0.9) | |
rdoc (3.12) | |
json (~> 1.4) | |
ruby-debug (0.10.4) | |
columnize (>= 0.1) | |
ruby-debug-base (~> 0.10.4.0) | |
ruby-debug-base (0.10.4) | |
linecache (>= 0.3) | |
sprockets (2.1.3) | |
hike (~> 1.2) | |
rack (~> 1.0) | |
tilt (~> 1.1, != 1.3.0) | |
sqlite3 (1.3.6) | |
sqlite3-ruby (1.3.3) | |
sqlite3 (>= 1.3.3) | |
thin (1.3.1) | |
daemons (>= 1.0.9) | |
eventmachine (>= 0.12.6) | |
rack (>= 1.0.0) | |
thor (0.14.6) | |
tilt (1.3.3) | |
treetop (1.4.10) | |
polyglot | |
polyglot (>= 0.3.1) | |
tzinfo (0.3.33) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
fb_graph | |
jquery-rails | |
magic_encoding | |
rails | |
rake | |
ruby-debug | |
sqlite3-ruby | |
thin |
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment