Forum: Rails deployment deploying Ruby on rails on hostgator

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.
Johny b. (Guest)
on 2009-03-13 11:19
I created a Ruby on rails application on my linux.
here the what i did

1.first I log in to my ssh account
2.create an application rails /home/myusername/webregistration
3 cd webregistration
4 cd ../public_html
5 ln –s ../webregistration/public mywebregistration
6.upload my application develop locally using ftp.I overwite all except
for the public folder.

7.upload the .htaccess on public folder
    on my .htaccess
          AddHandler fastcgi-script .fcgi
          AddHandler cgi-script .cgi
          Options +FollowSymLinks +ExecCGI
          RewriteEngine On
          RewriteRule ^$ index.html [QSA]
          RewriteRule ^([^.]+)$ $1.html [QSA]
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
   on my routes.rb
          ActionController::Routing::Routes.draw do |map|
           map.resources :websites
           map.connect 'mywebregistration/:controller/:action/:id'
           map.connect
'mywebregistration/:controller/:action/:id.:format'
           map.connect ':controller/:action/:id'
           map.connect ':controller/:action/:id.:format'
          end
    on my database.yml
          development:
           adapter: mysql
           database: username_websiteregistration
           username: username_johny
           password: ********
           host: myipaddress
when I browse my page I got an error
   http://DNS/mywebregistration/websites/

LoadError in WebsitesController#index
     /usr/lib/libmysqlclient.so.16: version `libmysqlclient_16' not
found       (required by
/usr/lib/ruby/site_ruby/1.8/i686-linux/mysql.so) -
/usr/lib/ruby/site_ruby/1.8/i686-linux/mysql.so

full trace
/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'
dispatch.cgi:10

This error occurred while loading the following files:
   mysql

can anyone know how to solve it.
Dimitris T. (Guest)
on 2009-03-15 03:17
have you tried localhost instead of ipaddress?
Dimitris T. (Guest)
on 2009-03-15 03:20
I'm also trying to deploy my app at hostgator and I'm facing this error:

undefined method `paginate_by_sql'

I have installed will_paginate both as a gem and plugin and in my local
configuration the app works fine. Any idea?
Johny b. (Guest)
on 2009-03-16 04:23
Dimitris Theodorakis wrote:
> have you tried localhost instead of ipaddress?
thank you very much for your reply
yes I try too but I got the same error.maybe if you had made a success
on deploying a RoR application locally develop and deploy on their linux
server please post an instructions on how.
Dimitris T. (Guest)
on 2009-03-16 13:21
Johny ben wrote:
> Dimitris Theodorakis wrote:
>> have you tried localhost instead of ipaddress?
> thank you very much for your reply
> yes I try too but I got the same error.maybe if you had made a success
> on deploying a RoR application locally develop and deploy on their linux
> server please post an instructions on how.
Finally after a weekend I have my rails app up and running.

I use exactly the same version as hostgator for rails, gems etc. So I
did nothing like freezing rails or gem. My problem was the above. I was
always getting an error as rails server didn't include the path of
/vendor/plugins. So we added this little magic line on my
/config/environment.rb

"config.load_paths += %W( #{RAILS_ROOT}/vendor/plugins )" and everything
works fine right now.

no .htaccesses added!
Johny b. (Guest)
on 2009-03-17 03:21
wow great.
Can you please elaborate detail by detail from start on how you upload
the application.what is your development environment.how you upload your
application through ftp or ssh.what modification you did.

again thank you very much
Dimitris T. (Guest)
on 2009-03-24 14:31
Johny ben wrote:
> wow great.
> Can you please elaborate detail by detail from start on how you upload
> the application.what is your development environment.how you upload your
> application through ftp or ssh.what modification you did.
>
> again thank you very much

the process was really very simple. I use the same rails and gem
versions so I didn't have to freeze my project. I created a new RoR
application (cpanel), I uploaded my app and replaced the files from the
app that I had just created (~/etc/rail_apps/sample_app/). Then I
created a symbolic link from the cpanel, I added the line from the above
comment  to my config/environment.rb and just everything works
This topic is locked and can not be replied to.