Integrating with Rails using Ruby 1.9.1

11 views
Skip to first unread message

Julian Burgess

unread,
Jun 22, 2009, 4:30:15 PM6/22/09
to Compass
I've followed the instructions here

http://github.com/chriseppstein/compass-rails-sample-application/tree/master

but it doesn't seem to be running successfully. If I run

compass --watch --sass-dir app/stylesheets/ --css-dir public/
stylesheets/

It works fine, but obviously it's a pain to be running this manually.

I've tried fiddling around with the config and folders, but it doesn't
seem to be running on request. I'm using Ruby 1.9.1p129, Rails 2.3.2,
with Phusion Passenger 2.2.2, Haml 2.1.34, Compass 0.6.15. Any ideas?

Chris Eppstein

unread,
Jun 22, 2009, 4:40:29 PM6/22/09
to compas...@googlegroups.com
You certainly don't need to use the compass command line to compile your stylesheets if you're using rails. Compass configures sass which integrates with rails and keep your stylesheets compiled.

I don't know why it's not working for you without the command line. Are you seeing any errors? If you want, zip up your app and email it to me directly and I'll poke around a little.

chris

Julian Burgess

unread,
Jun 28, 2009, 7:08:47 PM6/28/09
to compas...@googlegroups.com
Hi Chris

I've tried it with a fresh app, following your instructions but still
no luck. The sample rails app works ok though, so I guess it's down to
a issue within the rails app rather than system config. If you're able
to have a look that would be great.

Julian




2009/6/22 Chris Eppstein <ch...@eppsteins.net>:
compass-test.zip

Chris Eppstein

unread,
Jun 28, 2009, 8:19:05 PM6/28/09
to compas...@googlegroups.com
Works fine for me. Here's what I did:
  1. I downloaded it and unzipped your project.
  2. I went into the project directory
  3. I ran ./script/server
  4. I saw that you had a posts controller
  5. I visited http://localhost:300/posts
  6. The stylesheets where then found in public/stylesheets/compiled.
Please note that stylesheets are (re)compiled when a controller is accessed, not by simply starting the application.

Chris

Julian Burgess

unread,
Jun 29, 2009, 5:44:40 AM6/29/09
to compas...@googlegroups.com
Hi Chris

It works fine with Ruby1.8 but not 1.9.1p129. I'll run it with 1.8 for
the time being. Let me know if there are things I could try which
would help or to test.

Julian

Chris Eppstein

unread,
Jun 29, 2009, 11:40:59 AM6/29/09
to compas...@googlegroups.com
Ok. I'll try it with ruby 1.9 too.

chris

Priidu

unread,
Jul 26, 2009, 4:31:31 AM7/26/09
to Compass
Hi!

I have got same issue with ruby 1.9.1 "compass --force":

Nothing to compile. If you're trying to start a new project, you have
left off the directory argument.
Run "compass -h" to get help.

It does not work with rails version, however when I tested with plain
compass "compass ." then it does compile. Everything works with ruby
1.8.7.

Cheers,
Priit

On Jun 29, 6:40 pm, Chris Eppstein <ch...@eppsteins.net> wrote:
> Ok. I'll try it with ruby 1.9 too.
> chris
>

adeel

unread,
Jul 30, 2009, 7:24:40 AM7/30/09
to Compass
On Jun 22, 4:30 pm, Julian Burgess <auberg...@gmail.com> wrote:
> I've followed the instructions here
>
> http://github.com/chriseppstein/compass-rails-sample-application/tree...
>
> but it doesn't seem to be running successfully.

Same issue here on ruby 1.9.1p129, rails 2.3.3, haml 2.3.22, and
compass 0.8.8.

Chris Eppstein

unread,
Jul 30, 2009, 10:30:10 AM7/30/09
to compas...@googlegroups.com
I have applied a fix and it will go out in the next release. I was hoping that would be a major release, but maybe I'll issue a patch release in the interim...

chris
Reply all
Reply to author
Forward
0 new messages