While working with LocomotiveCMS using Rubinius I ran into a bunch of syntax errors. All were along the lines of expecting '|'
. No one was posting issues about this so I figured I would ask: How do I resolve these issues? Is this a problem with Rubinius?

- 295
- 1
- 7
1 Answers
First off, LocomotiveCMS only supports the "last version of Ruby" (Ruby 1.9.2 and greater). View the requirements section.
Rubinius defaults to Ruby 1.8.7 (view on rvm.io). If you look at the lines where most of these syntax errors occur like in app/models/locomotive/page.rb
they are most likely in "lambdas" which aren't supported until Ruby 1.9.
To resolve, you can make Rubinius (rbx) use Ruby 1.9 in two ways:
Use rvm to reinstall rbx using Ruby 1.9 as the default:
rvm reinstall rbx --1.9
Note: if rvm complains about bad arguments upgrade rvm using
rvm get master
orrvm get stable
.Or, if you don't want to completely reinstall rbx, you can set an environment variable in the directory which you'll be calling Rubinius, like in the rails root directory.
export RBXOPT=-X19
You can check that the environment variable is set by using
rbx -v
to check the Ruby version. It should return something like:rubinius 2.0.0.rc1 (1.9.3 release ...)
Note: If you are running Rubinius from another directory you will need to set this option again.

- 295
- 1
- 7