1

I can't seem to find any examples of Treetop in Rails apps. In a non rails app, when I do Treetop.load('name_of_treetop_file') it looks in the same folder and loads the .treetop file.

In my rails app, no matter where I put it I keep getting:

No such file or directory - name_of_treetop_.treetop

Where do I put my .treetop files so I can easily just call .load('name_of_treetop_file')

Thanks

pk1m
  • 286
  • 1
  • 4
  • 12
  • Nevermind, I answered my own question in the question itself. Just need to put the file path relative to the root' Treetop.load('lib/treetop/name_of_treetop_file') – pk1m Oct 17 '13 at 21:03

1 Answers1

0

There is no need to use Treetop.load. You can just require Treetop files. Polyglot will load the pre-generated Ruby, or find the treetop file, generate and load it on the fly.

cliffordheath
  • 2,536
  • 15
  • 16