Welcome Guest | Login

haml files not recognized

Hi,

I don't know how to get haml files recognized as the haml plugin is not working in your production environment.
Could you please tell me how to let my rails app know about your serverwide haml gem?

Thanks, Jochen.

2008-09-11 04:39 AM

Could you please try adding the following lines in your environment.rb.

If you are using haml as gem then

------------
require 'rubygems'
gem 'haml'
------------

If you are using haml as plugin then

---------
require 'rubygems'
require 'haml'
---------

2008-09-11 09:08 AM

OK,
I installed haml gem in the .gems directory and then added the lines to environment.rb as you recommended...but still same error that index.html.erb file can't be found

my environment.rb
ENV['RAILS_ENV'] ||= 'production'

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

Rails::Initializer.run do |config|

 config.action_controller.session = {
   :session_key => '_neues_licht_session',
   :secret      => '28d8a8dbdb9144887618ed88cde0141b4fc33f6d682c783c937737ca61c4ca571c2b0bb46e7f57affc70d43b0af65cc490e230bde4105e715ccef1356b733e80'
 }

end
require 'rubygems'
gem 'haml'

ActionController::AbstractRequest.relative_url_root = "/neueslicht"

2008-09-12 04:33 AM

Can you provide us the exact URL or steps to recreate the issue. I ran IRB session in your jailshell account and the status is pasted below.
=

$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'haml'
=> true
irb(main):003:0>

=

So the gem is available in your account for sure.

2008-09-12 02:48 PM

Regards,
Rahul
I neither can reproduce the issue because I simply cannot get the app running as a subfolder.

According to the tutorial for multiple apps everything should be setup right (the symlink in public_html is called "neueslicht2" pointing to the app "neueslicht") but there must be something wrong or missing because the application is not found and no error methods are printed to the log for "neueslicht".

Could you please help me and make that app work as a subfolder?

2008-09-15 04:21 PM

I tried running your fcgi process from the console and got the following error.
======
/usr/local/lib/ruby/gems/1.8/gems/haml-1.8.2/lib/haml/template/plugin.rb:42: undefined method `register_template_handler' for ActionView::Base:Class (NoMethodError)
       from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
       from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
       from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require'
       from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in'
======

Could you please have a look in to this.

2008-09-15 05:38 PM

Regards,
Rahul
Ok, thanks for that hint Rahul. It was a incompatibility of Rails 2.1.1 with haml 1.8.2 and I updated to the most recent haml version.

However, now I have another problem I also encountered with another application on your servers.

It is related to the globalite plugin and I already requested for help in this forum http://www.hostingrails.com/forums/deployment_troubleshooting_thread/1523).


Do you have any idea how to make globalite working in my particular case?

I would be very happy to have a solution to that problem.

Thanks,
Jochen.

2008-09-16 05:58 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.