Forum: Ruby on Rails ROR code syntax highlighting on blog?

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.
softwareengineer 99 (Guest)
on 2006-02-13 20:41
(Received via mailing list)
I am interested in putting the cool syntax highlighting for ROR code.
What's the best way to do that? Is it using textilize or another
formatting language? Or do I need special stylesheets?

  Any assistance is appreciated.

  Thanks
  Frank
Eric G. (Guest)
on 2006-02-13 20:45
(Received via mailing list)
Hi,
The latest version of Typo has built in Ruby Syntax highlighting.
Just surround your code with:

<typo:code lang="ruby">
def helloworld
    "Hello World"
end
</typo:code>

Eric

softwareengineer 99 wrote:
> Yahoo! Mail
> Use Photomail
> <http://us.rd.yahoo.com/mail_us/taglines/pmall2/*ht...
> to share photos without annoying attachments.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Eric G.
http://www.ericgoodwin.com
softwareengineer 99 (Guest)
on 2006-02-13 20:50
(Received via mailing list)
Yay! Very Nice.

  Thanks
  Frank

Eric G. <removed_email_address@domain.invalid> wrote:  Hi,
The latest version of Typo has built in Ruby Syntax highlighting.
Just surround your code with:


def helloworld
    "Hello World"
end


Eric

softwareengineer 99 wrote:
> Yahoo! Mail
> Use Photomail
>
> to share photos without annoying attachments.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Eric G.
http://www.ericgoodwin.com
Ben M. (Guest)
on 2006-02-14 03:15
(Received via mailing list)
Sorry for the (sort of) thread jump but I've often wished for syntax
highlighting in firefox... have looked for a plugin
to do this but haven't found anything. Has anyone ever heard of such a
beast? Maybe with a preferences page and the
ability to add new highlight configurations? That'd be sweet.

b
Ezra Z. (Guest)
on 2006-02-14 17:47
(Received via mailing list)
Ben-

	If I understand what you want, you are talking about being able to
syntax highlight random code on websites that you are visiting that
don't have syntax highlighting already? If thats the case then you
could whip something up using a combination of _why's hoodwink.d/
camping/and the syntax gem. Hoodwink.d is a sort of local proxy that
allows you to rewrite websites you visit with ruby code. Actually
sounds like a fun project.

Cheers-
-Ezra

On Feb 13, 2006, at 5:14 PM, Ben M. wrote:

>> The latest version of Typo has built in Ruby Syntax highlighting.
>>> another formatting language? Or do I need special stylesheets?
>>> *http://photomail.mail.yahoo.com> to share photos without
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
removed_email_address@domain.invalid
509-577-7732
softwareengineer 99 (Guest)
on 2006-03-04 01:04
(Received via mailing list)
I have the version 2.6.0 but when I tried the following all I get is the
code without the  syntax highlightling


<typo:code lang="ruby">
def helloworld
    "Hello World"
end
</typo:code>

Which version has this functionality? I thought 2.6.0 was the latest
before the typo.leesoft.com started showing a migration message?


Thanks for your assistance.

Frank


Eric G. <removed_email_address@domain.invalid> wrote:  Hi,
The latest version of Typo has built in Ruby Syntax highlighting.
Just surround your code with:


def helloworld
    "Hello World"
end


Eric

softwareengineer 99 wrote:
> Yahoo! Mail
> Use Photomail
>
> to share photos without annoying attachments.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Eric G.
http://www.ericgoodwin.com

_______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails



Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com
Eric G. (Guest)
on 2006-03-04 01:08
(Received via mailing list)
Hey,
Try getting the current build of typo, not the stable one.

http://www.typosphere.org/trac/wiki/DownloadCurrent

Cheers,
Eric G.

softwareengineer 99 wrote:
>
>     Just surround your code with:
>     > I am interested in putting the cool syntax highlighting for ROR
>     ------------------------------------------------------------------------
>     > http://lists.rubyonrails.org/mailman/listinfo/rails
>     http://lists.rubyonrails.org/mailman/listinfo/rails
> Bring photos to life! New PhotoMail
> <http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=39...
> makes sharing a breeze.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Eric G.
http://www.ericgoodwin.com
softwareengineer 99 (Guest)
on 2006-03-04 02:29
(Received via mailing list)
Hey Eric,

  Thanks for the reply.

  I am now trying to upgrade my typo installation but in the database
schema, I don't see a definition for comments table?

  So far everythign on my upgraded blog works except when I go to the
article page I get the following

      Showing app/views/articles/_comment_box.rhtml where line #22
raised:

undefined method `url' for #<Comment:0xb6e96114>
        Extracted source (around line #22):

19:     </tr>
20:     <tr id="guest_url" style="display:none;">
21:       <td><p><label for="comment_url">Your blog</label></p></td>
22:       <td> <%= text_field "comment", "url" %></td>
23:     </tr>
24:     <tr id="guest_email" style="display:none;">

Any ideas?

Why is Typo complaining about no url method? Has the comments table
being dropped?

Thanks
Frank
25:       <td><p><label for="comment_email">Your email</label></p></td>



Eric G. <removed_email_address@domain.invalid> wrote:  Hey,
Try getting the current build of typo, not the stable one.

http://www.typosphere.org/trac/wiki/DownloadCurrent

Cheers,
Eric G.

softwareengineer 99 wrote:
>
>     Just surround your code with:
>     > I am interested in putting the cool syntax highlighting for ROR
>     ------------------------------------------------------------------------
>     > http://lists.rubyonrails.org/mailman/listinfo/rails
>     http://lists.rubyonrails.org/mailman/listinfo/rails
> Bring photos to life! New PhotoMail
>
> makes sharing a breeze.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Eric G.
http://www.ericgoodwin.com

_______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails



Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com
Michael T. (Guest)
on 2006-03-04 02:50
(Received via mailing list)
Are you using the default typo theme or a custom one?  The reason I
ask is because the themes often have dependencies and if the theme
you're using does not correspond to the same version as your typo
source you'll have issues.

Michael
softwareengineer 99 (Guest)
on 2006-03-04 05:18
(Received via mailing list)
Hey Michael,
  I am using the default theme that comes with the current release.

  Interestingly I cannot see the schema for comments table in the code
that I checked out.

  Thanks for your assistance.
Frank
Michael T. <removed_email_address@domain.invalid> wrote:  Are you using the 
default typo
theme or a custom one?  The reason I
ask is because the themes often have dependencies and if the theme
you're using does not correspond to the same version as your typo
source you'll have issues.

Michael
_______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails



Rails Blog: http://railsruby.blogspot.com
MySQL Blog: http://mysqldatabaseadministration.blogspot.com
Linux / Security Blog: http://frankmash.blogspot.com
Michael T. (Guest)
on 2006-03-04 05:24
(Received via mailing list)
There is no comments table.  Typo uses STI, as I understand it, to
manage articles and comments all in a single table called contents.
Maybe that will help.

Michael
Mariano K. (Guest)
on 2006-04-02 23:12
(Received via mailing list)
Hi,

  and? Did that solve the problem?

  I have the same problem and don't want to update based on a hunch
... I changed some of the typo code and would like to use the time to
reintegrate doing other, more pressing, things ;-)

Cheers,
Mariano
This topic is locked and can not be replied to.