Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Slim syntax error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alexander Elmekeev  
View profile  
 More options Mar 21 2012, 2:08 am
From: Alexander Elmekeev <dona...@gmail.com>
Date: Tue, 20 Mar 2012 23:08:38 -0700 (PDT)
Local: Wed, Mar 21 2012 2:08 am
Subject: Slim syntax error

Hi!

I decided to try slim but on start I have strange error.

ActionView::Template::Error (Unknown line indicator

>   app/views/layouts/application.html.slim, Line 1
>     <!DOCTYPE html>
>     ^
> ):
>   slim (1.1.1) lib/slim/parser.rb:448:in `syntax_error!'

It appears on all pages. For example:

Started GET "/" for 127.0.0.1 at 2012-03-21 09:47:49 +0400

> Processing by AuthenticationsController#index as HTML
>   Authentication Load (0.9ms)  SELECT "authentications".* FROM
> "authentications"
>   User Load (1.0ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 17
> LIMIT 1
>   CACHE (0.0ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 17
> LIMIT 1
>   Rendered authentications/index.html.slim within layouts/application
> (88.4ms)

 I have "gem 'slim-rails'" in my Gemfile and

views/authentications/index.html.slim:

table

>   tr
>     th User
>     th Provider
>     th Uid
>   - for authentication in @authentications
>     tr
>       td = authentication.user_id
>       td = authentication.provider
>       td = authentication.uid
>       td = link_to "Destroy", authentication, :confirm => 'Are you sure?',
> :method => :delete

 views/layouts/application.html.slim:

doctype 5

> html
>   head
>     title gttc
>     = stylesheet_link_tag    "application", :media => "all"
>     = javascript_include_tag "application"
>     = csrf_meta_tags
>   body
>     p hi!
>     = yield

I can't figure out cause of this error. It seems like slim parser is trying
to parse already generated html. But why? Where is my mistake?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ankur Sethi  
View profile  
 More options Mar 21 2012, 8:02 am
From: Ankur Sethi <ankursethi...@googlemail.com>
Date: Wed, 21 Mar 2012 08:02:34 -0400
Local: Wed, Mar 21 2012 8:02 am
Subject: Re: Slim syntax error

Your files look good.  Try with regular slim gem instead of slim-rails

Ankur

On Wed, Mar 21, 2012 at 2:08 AM, Alexander Elmekeev <dona...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexander Elmekeev  
View profile  
 More options Mar 21 2012, 8:29 am
From: Alexander Elmekeev <dona...@gmail.com>
Date: Wed, 21 Mar 2012 05:29:00 -0700 (PDT)
Subject: Re: Slim syntax error

Slim-rails requires slim gem, so it didn't help me.

I tried to debug and saw really strange thing. In render method of
action_view/template.rb I have ActionView:Template object with right path
to my layout, but with wrong @source field.
It filled with text from my old html.erb not with slim. Is there some some
sort of caching in rails, which I don't know about?

In my development environment I
have: config.action_controller.perform_caching = false, maybe I need to do
something more? Restarting IDE (RubyMine) isn't really helpful.

среда, 21 марта 2012 г. 16:02:34 UTC+4 пользователь Ankur написал:

среда, 21 марта 2012 г. 16:02:34 UTC+4 пользователь Ankur написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ankur Sethi  
View profile  
 More options Mar 21 2012, 9:41 am
From: Ankur Sethi <ankursethi...@googlemail.com>
Date: Wed, 21 Mar 2012 09:41:01 -0400
Local: Wed, Mar 21 2012 9:41 am
Subject: Re: Slim syntax error

slim-rails is supposed to only be giving some generators for rails and
includes the slim gem.  I suggested it in case it was inserting something
else because I had no such issues.  Your layout looks very similar to mine
and i had no issues.

On Wed, Mar 21, 2012 at 8:29 AM, Alexander Elmekeev <dona...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Magnus Holm  
View profile  
 More options Mar 21 2012, 9:42 am
From: Magnus Holm <judo...@gmail.com>
Date: Wed, 21 Mar 2012 14:42:59 +0100
Local: Wed, Mar 21 2012 9:42 am
Subject: Re: Slim syntax error
On Wednesday 21. March 2012 at 13:29, Alexander Elmekeev wrote:

> Slim-rails requires slim gem, so it didn't help me.

> I tried to debug and saw really strange thing. In render method of action_view/template.rb I have ActionView:Template object with right path to my layout, but with wrong @source field.
> It filled with text from my old html.erb not with slim. Is there some some sort of caching in rails, which I don't know about?

> In my development environment I have: config.action_controller.perform_caching = false, maybe I need to do something more? Restarting IDE (RubyMine) isn't really helpful.

Are you able to reproduce it on a fresh app? If so, could you share it?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexander Elmekeev  
View profile  
 More options Mar 21 2012, 10:03 am
From: Alexander Elmekeev <dona...@gmail.com>
Date: Wed, 21 Mar 2012 07:03:36 -0700 (PDT)
Local: Wed, Mar 21 2012 10:03 am
Subject: Re: Slim syntax error

Hm. It's gone.

And yes, I was wrong about "restart doesn't help". Yes after restarting IDE
and server reloading I didn't see any difference, but when I looked at my
application.html.slim I saw old ,erb code.
So I think that was a IDE problem. RubyMine 4 is still a little raw, I
suppose.

I hope, that my further work with great slim will be faster, than start
point =)

Thanks, guys!

среда, 21 марта 2012 г. 17:42:59 UTC+4 пользователь Magnus Holm написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ankur Sethi  
View profile  
 More options Mar 21 2012, 10:09 am
From: Ankur Sethi <ankursethi...@googlemail.com>
Date: Wed, 21 Mar 2012 10:09:01 -0400
Local: Wed, Mar 21 2012 10:09 am
Subject: Re: Slim syntax error

I don't see how Rubymine is involved in the server process.  I use Rubymine
and never had any problems.  Anyway glad your issue is resolved.  slim is
very nice.

Ankur

On Wed, Mar 21, 2012 at 10:03 AM, Alexander Elmekeev <dona...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »