Help Please


One of my friends paid a fair share of money for a website and the
company that developed his site just left him and told him they would
no longer host his site because he didn't want to pay $150/mo for

I have never worked with Ruby before, but manage to transfer his
website to Hostgator (after a great deal of headache).

I have up and running on hostgator and have
fixed numerous issues (such as depricated commands, etc), but I am
stuck with a problem.

If you go here:
and click on 'Purchase' on either of the two events, and then click
"purchase" again in the middle screen, you will get the following

Application error
Change this error message for exceptions thrown outside of an action
(like in Dispatcher setups or broken Ruby code) in public/500.html

Can somebody PLEASE HELP!? I am willing to pay for getting this
resolved if that is required, :-/. We need this site up and running
by saturday, because the provider will be tearing down another one of
his sites.

Mongrel.Log Reads:

** Daemonized, any open files are closed. Look at log/ and
log/mongrel.log for info.
** Starting Mongrel listening at
** Starting Rails with production environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. TERM => stop. USR2 => restart. INT => stop (no
** Rails signals registered. HUP => reload (without restart). It
might not work well.
** Mongrel 1.1.5 available at
** Writing PID file to log/
34: warning: don't put space before argument parentheses
13: warning: multiple values for a block parameter (0 for 1)
  from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/
13: warning: multiple values for a block parameter (0 for 1)
  from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/

Production.log Reads:
Processing CartController#add_to_cart (for at 2010-07-28
18:00:47) [POST]
  Parameters: {"commit"=>"Purchase", "quantity"=>"1",
  e[4;36;1mMobileCarrier Load (0.1ms)e[0m e[0;1mSELECT * FROM
`mobile_carriers` e[0m
  e[4;35;1mAvailableTicket Load (0.1ms)e[0m e[0mSELECT * FROM
`available_tickets` WHERE (`available_tickets`.`id` = 31) e[0m
  e[4;36;1mEvent Load (0.1ms)e[0m e[0;1mSELECT * FROM `events` WHERE
(`events`.`id` = 25) e[0m
  e[4;35;1mAvailableTicket Load (0.1ms)e[0m e[0mSELECT * FROM
`available_tickets` WHERE (`available_tickets`.event_id = 25) e[0m
  e[4;36;1mTicket Load (0.1ms)e[0m e[0;1mSELECT `tickets`.* FROM
`tickets` WHERE (`tickets`.available_ticket_id IN (30,31)) e[0m
  e[4;35;1mSQL (0.1ms)e[0m e[0mselect as event_id, as
available_ticket_id, count( as ticket_count from events e inner
join available_tickets at on = at.event_id left outer join
tickets t on = t.available_ticket_id where in (30,31)
group by, e[0m
Redirected to
Completed in 5ms (DB: 0) | 302 Found [

environment config:

# Be sure to restart your web server when you modify this file.

# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'

# Specifies gem version of Rails to use when vendor/rails is not

# Bootstrap the Rails environment, frameworks, and default
require 'rubygems'
require File.join(File.dirname(__FILE__), 'boot') do |config|
  # Settings in config/environments/* take precedence those specified

  # Skip frameworks you're not going to use (only works if using
  # config.frameworks -= [ :action_web_service, :action_mailer ]

  # Add additional load paths for your own custom dirs
  config.load_paths += %W( #{RAILS_ROOT}/lib/alm/ticket_printing )

  # Force all environments to use the same logger level
  # (by default production uses :info, the others :debug)
  config.log_level = :debug

  # Use the database for sessions instead of the file system
  # (create the session table with 'rake db:sessions:create')
  # config.action_controller.session_store = :active_record_store

  # Use SQL instead of Active Record's schema dumper when creating the
test database.
  # This is necessary if your schema can't be completely dumped by the
schema dumper,
  # like if you have constraints or database-specific column types
  # config.active_record.schema_format = :sql

  # Activate observers that should always be running
  # config.active_record.observers = :cacher, :garbage_collector

  # Make Active Record use UTC-base instead of local time
  # config.active_record.default_timezone = :utc

  # See Rails::Configuration for more options

  config.action_controller.session = {
    :key => "_ARLiveMusic_session",
    :secret =>

# Add new inflection rules using the following format
# (all these examples are active by default):
# Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end

# Include your application configuration below

# Ticket Printing Service
require 'default.rb'
require 'xsd/qname'
# require 'defaultDriver.rb'
# require 'defaultMappingRegistry.rb'
require 'soap/mapping'
require 'soap/rpc/driver'

TPS_AD_CODE = 'ad001'

# Required for newsletter export
require 'fastercsv'

# Required for credit card processing
# moved payment to individual environment files
# Required for credit card processing
require 'payment'
TEST_MODE = false


# Required for thumnail resizing for event images
require 'RMagick'
include Magick
#file system home
EVENT_IMAGE_HOME = File.join(RAILS_ROOT, 'public', 'system', 'events')
#url path
EVENT_IMAGE_PATH = '/system/events'

# Flickr account info
# Requires registration and application for an API key
require 'flickr'
# id of flickr group for venue
FLICKR_GID = '422409@N21'
  :uid => 'XXXXXXXXXXXXXX@N04',
  :gid => FLICKR_GID,
  :cache => "#{RAILS_ROOT}/config/fickr.cache"

# Number of Featured shows to pull on homepage

# Application Name
# The email address we SHOULD send ALL mail from
# Mail character set

Please let me know if you need to see anything else!! THANK YOU in

I've seen stuff blow up like that when it couldn't write to the
session (although with a cookie store that seems fairly unlikely).
What version of rails are you running.


The log entry you have posted is for a successful attempt, which did
happen under certain circumstances while I was fiddling with your
site. If the error is making it to the logs you should see an entry
that returns code 500 rather than '302 Found'. With any luck it is
accompanied by a large stack trace.

In keeping with what Frederick said this seems to be an issue related
to the session. In firefox you can add a ticket once, then any
subsequent attempt will fail. If you close the browser and reopen it
(clearing the session cookie) you will be able to add to the cart once

It appears that you cannot remove tickets from the cart either. After
clicking remove and confirming in the pop up the ticket persists in
the cart. This could be session related.

Also the name '' that is specified under
TPS_ENDPOINT doesn't appear to be set up on your server.


You'll probably also want to change the session secret, as it's now
publicly available in the archive...

--Matt Jones