Environment: JRuby 1.4, Rails 2.3.4, GlassFish v3, MySQL
I’ve created a trivial Rails application (with just one scaffold) and
deployed on GlassFish on my local MacBook, works fine.
Moved the database to Amazon, change database configuration and the
local app still works fine.
Moved the app to Amazon and now am getting:
“uninitialized constant HomeController::Film”
where Film is an ActiveRecord object. The controller is:
– cut here –
class HomeController < ApplicationController
def index
@films = Film.paginate(:page => params[:page], :per_page => 10)
#@films = Film.find(:all)
@now = Time.now
end
end
– cut here –
and the model is:
– cut here –
class Film < ActiveRecord::Base
def self.table_name()
“film”
end
end
– cut here –
The error can be seen at:
http://ec2-174-129-63-49.compute-1.amazonaws.com:8080/GlassFishSimpleRailsApp/home/index
Here are a few things I’ve tried:
- Manually ensured the gem versions are exactly same
- Copied jruby distro + gems on Amazon instead of installing from
scratch. - Tried starting the app on Webrick instead of GlassFish
In all cases, the same error is thrown.
I’ve spent enough time on it (along with 2 other folks) yesterday/today
and need some guidance now. Are there any special considerations for
Rails applications if the database is hosted on the cloud environment ?
Thanks,
-Arun
–
Need Application Server ? Download from http://glassfish.org
Blog: http://blogs.sun.com/arungupta
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email