Trouble starting up Typo 5.0.3 on Bluehost

I installed Typo 5.0.3 as per the instructions found at
http://bartgdev.com/articles/2006/08/07/installing-typo-on-bluehost

In a nutshell:

  1. wgot the tar, unpacked it under ~/ruby/typo
  2. Created a symlink from my public_html dir to the typo install dir
  3. Set up the db, updated my database.yml
  4. Configured my environment.rb and .htaccess to production
  5. Installed a couple extra gems; theme-support and theme-generator.
  6. Ran public/dispatch.fcgi from my app root, which displays…

Liquid doesn’t seem to be loaded… uninitialized constant Liquid
Status: 500 Internal Server Error
Content-Type: text/html

500 Internal Server Error

[email protected] [~/ruby/typo-5.0.3]#

I get the following error in my log (The nil:NilClass is a reference to
a var called “this_blog” on both traces.):

Logfile created on Sun Apr 06 12:47:41 -0600 2008

Processing ArticlesController#index (for at 2008-04-06 12:48:20) [GET]
Parameters: {“action”=>“index”, “controller”=>“articles”}

NoMethodError (undefined method lang' for nil:NilClass): /app/controllers/application.rb:46:in load_lang’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:469:in
send!' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:469:in call’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:441:in
run' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:716:in run_before_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:695:in
call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in perform_action_without_benchmark’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in
perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in measure’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in
perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in perform_action_without_caching’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in
perform_action' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in cache’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in
cache' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in perform_action’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in
send' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in process_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in
process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in process’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in
process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in handle_request’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in
dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in dispatch_cgi’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:101:in process_request’
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:149:in
with_signal_handler' /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:99:in process_request’
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:77:in
process_each_request' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:606:in each_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:76:in
process_each_request' /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:50:in process!’
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:24:in
`process!’
public/dispatch.fcgi:24

Processing ArticlesController#index (for at 2008-04-06 12:48:20) [GET]
Parameters: {“action”=>“index”, “controller”=>“articles”}

NoMethodError (undefined method current_theme' for nil:NilClass): /app/controllers/content_controller.rb:60:in theme_layout’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:236:in
send!' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:236:in active_layout’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:293:in
pick_layout' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:256:in render_without_benchmark’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in
render' /usr/lib/ruby/1.8/benchmark.rb:293:in measure’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in
render' /app/controllers/application.rb:26:in rescue_action_in_public’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:125:in
rescue_action' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:203:in perform_action_without_caching’
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in
perform_action' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in cache’
“./production.log” 118 lines, 10170 characters

Anyone see this issue, or have any idea of what’s going on? It seems
like “this_blog” is not being initialized on start-up, but I haven’t the
slightest idea why. Also, I have no idea what the message “Liquid
doesn’t seem to be loaded… uninitialized constant Liquid”…any ideas
on this?

I have googled around but cannot find any good leads. Any and all help
is greatly appreciated.

Thanks!
Randy

Did you add:

AddHandler fcgid-script .fcgi

to your .htaccess file in your public folder?

The standard:

AddHandler fastcgi-script .fcgi

doesn’t seem to work with bluehost.

Brad, thank you very much for your prompt reply. I just made the tweak
you suggested, but it seems to have no effect. What follows is my
.htaccess file:

General Apache options

#AddHandler fastcgi-script .fcgi
AddHandler fcgid-script .fcgi
AddHandler cgi-script .cgi
#Options +FollowSymLinks +ExecCGI
SetEnv RAILS_ENV production

If you don’t want Rails to look in certain directories,

use the following rewrite rules so that Apache won’t rewrite certain

requests

Example:

RewriteCond %{REQUEST_URI} ^/notrails.*

RewriteRule .* - [L]

Redirect all requests not available on the filesystem to Rails

RewriteEngine On

If Typo is accessed via an Alias directive, then you MUST also set

the RewriteBase in this htaccess file.

Example:

Alias /blog /path/to/typo/public

RewriteBase /blog

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)/!$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

In case Typo experiences terminal errors

Instead of displaying this message you can supply a file here which

will be rendered instead

Example:

ErrorDocument 500 /500.html

ErrorDocument 500 “

Application error

Typo failed to start
properly”

Thanks again. I had tried that as well, I changed the perms on
typo/public and typo/log. I was able to get typo running in under 10
minutes on my local machine, I am wondering if it some sort of gem
version compatibility issue?

[email protected] [~/ruby/typo-5.0.3]# ruby -v
ruby 1.8.6 (2007-09-23 patchlevel 110) [x86_64-linux]
[email protected] [~/ruby/typo-5.0.3]# rails -v
Rails 2.0.2
[email protected] [~/ruby/typo-5.0.3]# gem -v
1.0.1
[email protected] [~/ruby/typo-5.0.3]# gem list

*** LOCAL GEMS ***

actionmailer (2.0.2, 1.3.6, 1.2.5)
actionpack (2.0.2, 1.13.6, 1.12.5)
actionwebservice (1.2.6, 1.1.6)
activerecord (2.0.2, 1.15.6, 1.14.4)
activeresource (2.0.2)
activesupport (2.0.2, 1.4.4, 1.4.0, 1.3.1)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.9, 1.0.2)
fastthread (1.0.1)
fcgi (0.8.7)
gem_plugin (0.2.3, 0.2.1)
login_generator (1.2.2)
mongrel (1.1.3, 0.3.13.4)
mongrel_cluster (1.0.5)
mysql (2.7)
rails (2.0.2, 1.2.6, 1.1.6)
rake (0.8.1, 0.7.1)
RedCloth (3.0.4)
rmagick (1.15.13, 1.15.12)
sources (0.0.1)
sqlite3-ruby (1.2.1)
theme_generator (1.3.0)
tzinfo (0.3.3)

If you want to install the Typo gem you’ll need to edit your .bashrc
file (in your root directory), add the following to the end of the file:

export PATH="$PATH:$HOME/packages/bin:$HOME/.gems/bin"
export GEM_HOME="$HOME/.gems"
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8"
export GEM_CACHE="$GEM_HOME/cache"

Then run from the command line:

source ~/.bashrc

Then you should be able to install all gems:

gem update -y

and install the Typo gem:

gem install -y typo

I’ve been able to get typo running, but I’m having trouble with the
RSS feeds myself, so I’m interested to see if you’ll have any better
luck!

Now you might need to run:

chmod -R 775 ~/path/to/typo/public

If you want to install the Typo gem you’ll need to edit your .bashrc
file (in your root directory), add the following to the end of the file:

export PATH="$PATH:$HOME/packages/bin:$HOME/.gems/bin"
export GEM_HOME="$HOME/.gems"
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8"
export GEM_CACHE="$GEM_HOME/cache"

Then run from the command line:

source ~/.bashrc

Then you should be able to install all gems:

gem update -y

and install the Typo gem:

gem install -y typo

I’ve been able to get typo running, but I’m having trouble with the
RSS feeds myself, so I’m interested to see if you’ll have any better
luck!

ok… maybe I will try this next. I will back everything out and start
from scratch with the gem. Thanks, and I will let you know what happens.

Hello,

For your information, Typo 5.0.3 doesn’t come as a gem since it seems
to break everything (never managed to figure out why, and we really
had to release 5.0.3 as it fixed lots of critical bugs).
I Hope I ll be able to release a 5.0.4 gem.

Best regards,
Frédéric

Le 6 avr. 08 à 22:33, Randy Shepherd a écrit :

export GEM_HOME=“$HOME/.gems”
gem update -y

actionmailer (2.0.2, 1.3.6, 1.2.5)
login_generator (1.2.2)
tzinfo (0.3.3)

#AddHandler fastcgi-script .fcgi

Example:

Example:

which

bluehost

/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
call_filters' action_controller/ /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ perform_action’
filters.rb:685:in
action_controller/
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
99:in
50:in
Parameters: {“action”=>“index”, “controller”=>“articles”}
action_controller/
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/
the
is greatly appreciated.


http://rubyforge.org/mailman/listinfo/typo-list
Typo-list mailing list


Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list


Frédéric de Villamil
[email protected] tel: +33 (0)6 62 19 1337
http://fredericdevillamil.com Typo : http://typosphere.org

Ok, thats good to know. Did anything in the details of my problem below
illicit any ideas as to what could be the problem? Please take a quick
look at my trace and see if you could give me any leads on where to
start for a solution.

On another note, this i not the first time I have had problems getting
an open source ruby app running correctly on bluehost. Does anyone have
any recommendations on a ruby host that is a less of a pain in the neck?

Thanks,
Randy

Good luck! I’ll be interested to hear your results.

That 2006 article is too old. I just write a new article about this, you
can find all the details on my blog: http://typo.eeacsite.com/.

Hope it will be helpful.