Forum: Ruby on Rails Help with deploying my app!

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin Morrice (dr_gavin)
on 2009-01-13 11:52
(Received via mailing list)
Hi all - I'm a noob when it comes to deploying a rails app and my
Hosting service providers offer almost no assistance. All the help
I've had so far has been misinformation from their Indian 'technical
advisers'

I'm pulling my hair out trying to get this thing launched

If anyone could spare 20mins to chat either on this thread or on MSN/
Skype I'd really appreciate it

thanks
B14575f0ca69f10938fdd67e7156e0e1?d=identicon&s=25 Craig Demyanovich (Guest)
on 2009-01-13 15:45
(Received via mailing list)
If you post specific problems, I'm sure folks here will try to help. You
might also check out the deployment group:

http://groups.google.com/group/rubyonrails-deployment

Regards,
Craig
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin Morrice (dr_gavin)
on 2009-01-13 19:14
(Received via mailing list)
Thanks Craig
I didn't actually realise there was a deployment group.

I've managed to get the app running on the server now.

In my routes.rb I have set map.root to my homepage controller's index

In deployment mode, I remove public/index.html and my homepage action
became the default index path
This worked fine in deployment mode but now that I've launched in
production mode, the homepage shows a 500 error.

Can anybody advise?

Thanks
82e31cc9f57fcbd5c797ac4f8e3a7551?d=identicon&s=25 Jason White (silliemunkie)
on 2009-01-13 19:19
(Received via mailing list)
what errors are in the production log?

Jason
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin Morrice (dr_gavin)
on 2009-01-13 19:37
(Received via mailing list)
Most recent entry to the log, when I visit the homepage:

Processing Public::HomepageController#index (for 84.64.194.14 at
2009-01-13 18:18:10) [GET]
  Parameters: {"action"=>"index", "controller"=>"public/homepage"}


Processing Public::HomepageController#index (for 84.64.194.14 at
2009-01-13 18:18:10) [GET]
  Parameters: {"action"=>"index", "controller"=>"public/homepage"}


MissingSourceFile (no such file to load -- mysql):
    /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
    /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
dependencies.rb:155:in `require'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
core_ext/kernel/requires.rb:7:in `require_library_or_gem'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
core_ext/kernel/reporting.rb:11:in `silence_warnings'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
core_ext/kernel/requires.rb:5:in `require_library_or_gem'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/mysql_adapter.rb:63:in `mysql_connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:223:in `send'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:223:in
`new_connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:245:in
`checkout_new_connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:188:in `checkout'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:184:in `loop'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:184:in `checkout'
    /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:183:in `checkout'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:98:in `connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:326:in
`retrieve_connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:121:in
`retrieve_connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:113:in
`connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
query_cache.rb:8:in `cache'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
caching/sql_cache.rb:12:in `perform_action'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:524:in `send'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:524:in `process_without_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
filters.rb:606:in `process_without_session_management_support'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
session_management.rb:134:in `process'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:392:in `process'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:183:in `handle_request'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:110:in `dispatch_unlocked'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:123:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:122:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:122:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:132:in `dispatch_cgi'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:39:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:76:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:74:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:74:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
159:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
158:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
158:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
285:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
285:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
268:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
268:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
268:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
configurator.rb:282:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
configurator.rb:281:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
configurator.rb:281:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in
`run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
command.rb:212:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    /usr/bin/mongrel_rails:19:in `load'
    /usr/bin/mongrel_rails:19

Rendering /home/thinkers/public_html/thinkers/public/500.html (500
Internal Server Error)

----------------

Not sure if this offers any useful info?




On 13 Jan, 18:17, "jason white" <stonesoupandboiledfr...@gmail.com>
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin Morrice (dr_gavin)
on 2009-01-13 19:53
(Received via mailing list)
Okay - so I'm guessing now that the problem is with my app and MYSQL

"MissingSourceFile (no such file to load -- mysql)"

I have installed the MySQL 2.7 gem on my domain using the options
provided by my host. After rebooting (and reloading) I still have the
same issue.

Anyone have any ideas? I'm starting to go bald!

(:o|
82e31cc9f57fcbd5c797ac4f8e3a7551?d=identicon&s=25 Jason White (silliemunkie)
on 2009-01-13 19:56
(Received via mailing list)
who are you hosting your site with?
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin Morrice (dr_gavin)
on 2009-01-13 19:58
(Received via mailing list)
600host.net


On 13 Jan, 18:55, "jason white" <stonesoupandboiledfr...@gmail.com>
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin Morrice (dr_gavin)
on 2009-01-14 20:37
(Received via mailing list)
This is still really stressing me out. If anybody could spare a few
minutes to help out I'd really appreciate it.

The problem is that my app cant seem to locate the MySQL gem.

My host have a system in which you load gems automatically by
selecting them from a list.

They then explain my gem is stored in a specific directory and I
should add a snippet of code to my script to locate it:

here's the text straight from their site:
------------------------
Ruby Gems are are collections of functions that allow you to perform
tasks in Ruby. You will need to install a Gem before you can use it
inside a Ruby program.

Note: Gems are installed directly from the RubyForge repository.

Location of Your Ruby Gem(s)

Path: /home/thinkers/ruby/gems

Using Your Ruby Gem(s)

You will need to add /home/thinkers/ruby/gems to the include path.
You can do this by adding the following code to your script:

$:.push("/home/thinkers/ruby/gems")
--------------
Has anybody dealt with a system like this before? Is this normal?

Where should I add the line $:.push("/home/thinkers/ruby/gems") so my
app can find the MySQL gem?

Thanks

Gavin
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin Morrice (dr_gavin)
on 2009-01-15 12:53
(Received via mailing list)
I've finally got my app running : www.thinkersplayground.com

A new problem has arisen though :S

My app was written in Rails 2.1 but Im running it on Rails 2.2.2 on my
host

Previously, all of my routes worked fine, they were all tested and
life was kushty.

Here's a sample of my routes.rb file:

  map.namespace :private do |private|
    private.resources :articles,
      :controller => 'articles',
      :has_one => :discussion,
      :member => {:preview => :get, :submitted => :get, :approved
=> :get, :add_tags => :get, :submit => :get,
        :publish => :get, :retire => :get, :tag_article => :post},
      :collection => {:submitted_articles => :get, :approved_articles
=> :get, :my_articles => :get,
        :blueprints => :get},
      :shallow => true do |article|
        article.resources :pages, :controller => 'pages'
    end

    private.resources :authors,
      :controller => 'authors', :member => {:profile => :get} do |
author|
        author.resources :articles, :controller => 'articles'
        author.resources :messages, :controller => 'messages'
    end

    private.resources :comments, :controller => 'comments', :member =>
{:allow => :get, :remove => :get}


When I run rake routes in Rails 2.2.2, only a few of these routes are
recognised and so I get a 500 error.

It doesn't notice, for example, edit_private_article_path(@article)

Has routing changed in Rails 2.2 ?

If so, any clues as to how I can fix this?

Thanks
Gavin
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin Morrice (dr_gavin)
on 2009-01-15 12:58
(Received via mailing list)
removed ":shallow => true"

should have spotted that earlier

-duh
This topic is locked and can not be replied to.