Just FYI Brad

Your suggestion put me on the road ( not yet solved , but I found what
the issue could be ...)
I went on my production server and open a Rails console , and after
initializing the app, I just entered the standard :
>I18n.t(;hello)
to get it translated....
 this starts the I18n Backend ( simple and base in my config) which
starts a load_yml, to load the locale files and parse them...
on my OS X local computer , no problem...
on the Centos server .... bingo
ruby-1.9.2-p136 :004 > I18n.t(:english)
Psych::SyntaxError: couldn't parse YAML at line 14 column 14
        from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:
148:in `parse'
        from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:
148:in `parse_stream'
        from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:
119:in `parse'
        from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:
106:in `load'
        from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:
205:in `load_file'
        from /usr/local/rvm/gems/ruby-1.9.2-p136@rails3/gems/i18n-0.5.0/lib/
i18n/backend/base.rb:170:in `load_yml'
        from /usr/local/rvm/gems/ruby-1.9.2-p136@rails3/gems/i18n-0.5.0/lib/
i18n/backend/base.rb:156:in `load_file'

all locale files are UTF-8, it's running well on OS X ... so ..
the issue should be in the installed libyaml on Centos raising an
error ...

erwin

On 3 fév, 19:00, Bradley Grzesiak <listro...@gmail.com> wrote:
> It sounds like you have a locale file issue. If it is indeed working
> locally, but not remotely, I would surmise an encoding problem. That is,
> your dev box can read line 15 of your locale file, but the server is having
> an encoding issue.
>
> Also, are you sure both dev and server are running the same
> version/patchlevel of ruby?
>
> :brad
>
>
>
>
>
>
>
>
>
> On Thu, Feb 3, 2011 at 11:45 AM, kadoudal <kadou...@gmail.com> wrote:
> > [haml 3.0.25 / ham-rails.0.3.4 / rails 3.0.3 / ruby 1.9.2p136)
>
> > running in production on a remote server, I get an error I don't have
> > when running on my local server
> > where should I start finding the issue ?  as it runs very well
> > locally .. missing gem ... ( no warning during deployment) or missing
> > dependencies ..?
>
> > ======= here is the production.log =========
>
> > Started GET "/" for XX.XXX.XX.XXX at 2011-02-03 16:57:45 +0000
> >  Processing by HomeController#index as HTML
> > Rendered home/index.html.haml within layouts/application (9.3ms)
> > Completed   in 19ms
>
> > ActionView::Template::Error (couldn't parse YAML at line 15 column
> > 14):
> >    1: - breadcrumbs << link_to(I18n.t(:home), home_path)
> >    2:
> >    3: - title I18n.t(:home)
> >    4:
> >  app/views/home/index.html.haml:1:in
> > `_app_views_home_index_html_haml___650313189_107810100_970220967'
>
> > == here is the app/views/home/index.html.haml   =======
>
> > - breadcrumbs << link_to(I18n.t(:home), home_path)
>
> > - title I18n.t(:home)
>
> > = render :partial => "shared/sidebar"
>
> > - if @posts_in_selected_category.empty?
> >        %p= I18n.t(:no_post_to_display)
> > - else
> >        %p= I18n.t(:posts_to_display)
>
> > == here is the breadcrumb action in the application_helper.rb
> > =======
> >  def breadcrumbs
> >    @breadcrumbs ||= begin
> >      crumbs = []
> >      crumbs << link_to(I18n.t(:home), root_path).html_safe if
> > user_signed_in? && !(request.fullpath == root_path)
> >      crumbs
> >    end
> >    @breadcrumbs.flatten!
> >    @breadcrumbs.uniq!
> >    @breadcrumbs
> >  end
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Haml" group.
> > To post to this group, send email to haml@googlegroups.com.
> > To unsubscribe from this group, send email to
> > haml+unsubscr...@googlegroups.com <haml%2bunsubscr...@googlegroups.com>.
> > For more options, visit this group at
> >http://groups.google.com/group/haml?hl=en.
>
> --
> Bradley Grzesiak
> co-founder, bendyworks llchttp://bendyworks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to