ROR code syntax highlighting on blog?


#1

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


#2

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/*http://photomail.mail.yahoo.com
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


#3

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


#4

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


#5

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


#6

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


#7

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=39174/*http://photomail.mail.yahoo.com
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


#8

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:
20:


21:

Your blog


22: <%= text_field “comment”, “url” %>
23:
24:

Any ideas?

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

Thanks
Frank
25:

Your email

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


#9

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


#10

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


#11

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 :wink:

Cheers,
Mariano


#12

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