NameError (uninitialized constant Goldberg):

44 views
Skip to first unread message

KoosJaap

unread,
Jul 5, 2010, 6:20:00 PM7/5/10
to Ruby on Rails: Goldberg
Hello,

I'm rather new to Rails and I'm trying to get a application working
with rails version 2.3.4 and Goldberg. One of my problems is that
while running my application in development mode I don't get errors
and when I'm trying to run in production mode at my rails hosting
provider I get errors.
First problem was a routing error (404). I "solved" this by adding
map.root :controller => 'goldberg/auth', :action => 'login'
in the routes.rb file.
However now I get an internal server error (500). In production.log it
says:

Processing ApplicationController#login (for 82.95.200.225 at
2010-07-05 23:48:11
) [GET]

NameError (uninitialized constant Goldberg):
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/
phusion_passen
ger/rack/request_handler.rb:92:in `process_request'
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/
phusion_passen
ger/abstract_request_handler.rb:207:in `main_loop'
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.2.9/lib/
phusion_passen

Has someone perhaps any suggestions ?

Erhard

unread,
Jul 8, 2010, 1:16:20 AM7/8/10
to Ruby on Rails: Goldberg
How do You hve installed Goldberg ?
Its an Installation Problem because You should not have to change Your
routes.rb.
And Goldberg constant is not found.
When You look at the init.rb in the /vendor/plugins/goldberg There are
some "pathes" hooked in the LOADPATH variable and libs which are
required.
This hook makes Goldberg run.
The init.rb is executed during the startup process.
(So make a put in it an look wether its fired.
A second thing is while installing goldberg some Files are copied in
your app strucuture ,

Hope this helps


Erhard

KoosJaap

unread,
Jul 19, 2010, 12:31:39 PM7/19/10
to Ruby on Rails: Goldberg
Erhard,

Thanks for your reply.

I added 'puts "goldberg init started" '. That worked fine in
development mode. I use webbrick and saw in the dos box dat the string
was displayed. In production I'm not sure where to look. I don't have
access to a webserver log. I tried logger.info("goldberg init.rb
started") in the init file, but that didn't work.
However I might do something wrong in installation. I try to explain
how I installed Goldberg:
- with git (for Windows) I installed goldberg in my developers
environment according to the wiki at github
- when going to production I copied my MySQL development database with
backup and restore via sql. With phpadmin I can access my database on
production and with "ruby ./script/console" I can execute a find on my
database
- by means of git and Capistrano I deployed my source to the
production server. I used the following deploy.rb:

set :user, "uropn"
set :domain, "uropn.railscluster.nl"
set :application, "uroPN"

set :deploy_via, :remote_cache
# set :copy_cache, "/temp/#{application}"
# set :copy_compression, :gzip

set :scm, 'git'
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`,
`perforce`, `subversion` or `none`
set :repository, "ssh://ur...@ssh.railscluster.nl:2222/~/git/
uropn.git"
set :branch, "master"
set :scm_verbose, true

set :deploy_to, "/home/#{user}/web_root"
set :use_sudo, false

ssh_options[:port] = 2222
default_run_options[:pty] = true

server "ssh.railscluster.nl", :app, :web, :db, :primary => true

namespace :deploy do
task :start, :roles => :app do
run "touch #{current_release}/tmp/restart.txt"
end

task :stop, :roles => :app do
# Do nothing.
end

task :restart, :roles => :app do
run "touch #{current_release}/tmp/restart.txt"
end
end
# end deply.rb

- Am I perhaps skipping some steps ? I hope you can tell.

Kind regards,

Koos

Erhard Karger

unread,
Jul 30, 2010, 2:52:31 AM7/30/10
to rubyonrail...@googlegroups.com
Hi Koos,

sorry for my late reply ....

Well in depoying with capistrano a can't help you very well. What I do to bring it into production is a totally other strategy.
I run in Jruby on production I have tomcat and my deployment are own rake scripts which extract from git ,  rsync to the server and warble on the server a war file for deployment. My goldberg - content is dumped from database in dev then put in git  and reloaded in prod Therefor I have written the
tasks in goldberg load_goldberg and dump_goldberg Then I have a versioning for the content which has to fit to the controllers.




Erhard

 









--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Goldberg" group.
To post to this group, send email to rubyonrail...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-gold...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-goldberg?hl=en.


Reply all
Reply to author
Forward
0 new messages