Re: sass_on_heroku / hassle
Thanks morgoth, Will try this later. I guess more people are interested in using haml/sass/compass within their rails app on heroku. Perhaps a FAQ can be written on heroku.com how to implement it. I googled and found this http://blog.heroku.com/archives/2009/8/18/heroku_sass/ but I guess this points people to the wrong directions, as hassle didn't work. Perhaps http://github.com/merbjedi/hassle should be merged? On Mar 28, 11:19 pm, morgoth wrote: > You can try merbjedi fork of hassle:http://github.com/merbjedi/hassle > > It this wont help, you can use Rack::Static middleware like this: > > remove hassle > change your sass (compass) settings: > config.css_dir = "tmp/public/compiled/stylesheets" > > Create initializer with code: > > ActionController::Dispatcher.middleware.use Rack::Static, :root => > "tmp/public", :urls => ["/compiled/stylesheets"] > > This will always compile your sass files to tmp and serve them by rack > static module. -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: sass_on_heroku / hassle
You can try merbjedi fork of hassle: http://github.com/merbjedi/hassle It this wont help, you can use Rack::Static middleware like this: remove hassle change your sass (compass) settings: config.css_dir = "tmp/public/compiled/stylesheets" Create initializer with code: ActionController::Dispatcher.middleware.use Rack::Static, :root => "tmp/public", :urls => ["/compiled/stylesheets"] This will always compile your sass files to tmp and serve them by rack static module. -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: sass_on_heroku / hassle
I guess I confused myself ;-) For now I also decided to just use compass/sass without hassle and commit the compiled css files to git. On Mar 27, 5:34 pm, Oren Teich wrote: > Hi Marcel, > > What's the confusion? As the github page says, sass_on_heroku is now > hassle. You should use that one. Which info on the heroku site is > outdated? > > Oren > > On Sat, Mar 27, 2010 at 5:50 AM, Marcel Overdijk > wrote: > > > > > Hi Oren, > > > I couldn't find this information on the hassle github page. > > Do you know if Hassle is advised to used by Heroku? > > > The page and the information on Heroku website seem to be 'outdated'. > > Heroku.com still mentions sass_on_heroku but it's github page says > > it's deprecated for pedro's Hassle. > > > Cheers, > > Marcel > > > On Mar 26, 6:40 pm, Oren Teich wrote: > > > hassle stores the stylesheets in varnish, cached for all dynos. > > > > Oren > > > > On Fri, Mar 26, 2010 at 6:30 AM, Marcel Overdijk > > > wrote: > > > > > As I understand sass_on_heroku or better hassle can be used to compile > > > > sass stylesheets to the /tmp folder on Heroku. I'm wondering what the > > > > findings are about using this approach. > > > > > I'm asking because of this mention in the Heroku docs. Especially the > > > > last sentence. > > > > > There are two directories that are writeable: ./tmp and ./log (under > > > > your application root). If you wish to drop a file temporarily for the > > > > duration of the request, you can write to a filename like > > > > #{RAILS_ROOT}/tmp/myfile_#{Process.pid}. There is no guarantee that > > > > this file will be there on subsequent requests (although it might be), > > > > so this should not be used for any kind of permanent storage. > > > > > Cheers, > > > > Marcel > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Heroku" group. > > > > To post to this group, send email to her...@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > heroku+unsubscr...@googlegroups.com > > > com> > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/heroku?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Heroku" group. > > To post to this group, send email to her...@googlegroups.com. > > To unsubscribe from this group, send email to > > heroku+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: sass_on_heroku / hassle
Hi Marcel, What's the confusion? As the github page says, sass_on_heroku is now hassle. You should use that one. Which info on the heroku site is outdated? Oren On Sat, Mar 27, 2010 at 5:50 AM, Marcel Overdijk wrote: > Hi Oren, > > I couldn't find this information on the hassle github page. > Do you know if Hassle is advised to used by Heroku? > > The page and the information on Heroku website seem to be 'outdated'. > Heroku.com still mentions sass_on_heroku but it's github page says > it's deprecated for pedro's Hassle. > > > Cheers, > Marcel > > On Mar 26, 6:40 pm, Oren Teich wrote: > > hassle stores the stylesheets in varnish, cached for all dynos. > > > > Oren > > > > On Fri, Mar 26, 2010 at 6:30 AM, Marcel Overdijk > > wrote: > > > > > > > > > As I understand sass_on_heroku or better hassle can be used to compile > > > sass stylesheets to the /tmp folder on Heroku. I'm wondering what the > > > findings are about using this approach. > > > > > I'm asking because of this mention in the Heroku docs. Especially the > > > last sentence. > > > > > There are two directories that are writeable: ./tmp and ./log (under > > > your application root). If you wish to drop a file temporarily for the > > > duration of the request, you can write to a filename like > > > #{RAILS_ROOT}/tmp/myfile_#{Process.pid}. There is no guarantee that > > > this file will be there on subsequent requests (although it might be), > > > so this should not be used for any kind of permanent storage. > > > > > Cheers, > > > Marcel > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Heroku" group. > > > To post to this group, send email to her...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > heroku+unsubscr...@googlegroups.com > > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/heroku?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to her...@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: sass_on_heroku / hassle
Got it working now, but not as I want... As long as ik keep sass templates in ./public/stylesheets/sass and include stylesheets from /stylesheets in html page everything works fine. However I like to change the template location of the sass templates to ./app/stylesheets using Sass::Plugin.options[:template_location] = "./app/stylesheets". But when I do this it won't work anymore. Next to that I would also change Sass::Plugin.options[:css_location] = "./public/stylesheets/compiled" So I can easily add this folder to .gitignore. I'm wondering if this possible with the hassle plugin. Any help appreciated. Cheers, Marcel On Mar 26, 6:40 pm, Oren Teich wrote: > hassle stores the stylesheets in varnish, cached for all dynos. > > Oren > > On Fri, Mar 26, 2010 at 6:30 AM, Marcel Overdijk > wrote: > > > > > As I understand sass_on_heroku or better hassle can be used to compile > > sass stylesheets to the /tmp folder on Heroku. I'm wondering what the > > findings are about using this approach. > > > I'm asking because of this mention in the Heroku docs. Especially the > > last sentence. > > > There are two directories that are writeable: ./tmp and ./log (under > > your application root). If you wish to drop a file temporarily for the > > duration of the request, you can write to a filename like > > #{RAILS_ROOT}/tmp/myfile_#{Process.pid}. There is no guarantee that > > this file will be there on subsequent requests (although it might be), > > so this should not be used for any kind of permanent storage. > > > Cheers, > > Marcel > > > -- > > You received this message because you are subscribed to the Google Groups > > "Heroku" group. > > To post to this group, send email to her...@googlegroups.com. > > To unsubscribe from this group, send email to > > heroku+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: sass_on_heroku / hassle
I tried to use hassle today but without succes. Locally it works but on Heroku server the stylesheet cannot be found. I've used both = stylesheet_link_tag "application.css" in my layout, but it just can't find /stylesheets/application.css Note that when I'm running my app locally it writes the compiled css to ./public/stylesheets and not in ./tmp. Don't know if this should be the case either? On Mar 26, 6:40 pm, Oren Teich wrote: > hassle stores the stylesheets in varnish, cached for all dynos. > > Oren > > On Fri, Mar 26, 2010 at 6:30 AM, Marcel Overdijk > wrote: > > > > > As I understand sass_on_heroku or better hassle can be used to compile > > sass stylesheets to the /tmp folder on Heroku. I'm wondering what the > > findings are about using this approach. > > > I'm asking because of this mention in the Heroku docs. Especially the > > last sentence. > > > There are two directories that are writeable: ./tmp and ./log (under > > your application root). If you wish to drop a file temporarily for the > > duration of the request, you can write to a filename like > > #{RAILS_ROOT}/tmp/myfile_#{Process.pid}. There is no guarantee that > > this file will be there on subsequent requests (although it might be), > > so this should not be used for any kind of permanent storage. > > > Cheers, > > Marcel > > > -- > > You received this message because you are subscribed to the Google Groups > > "Heroku" group. > > To post to this group, send email to her...@googlegroups.com. > > To unsubscribe from this group, send email to > > heroku+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: sass_on_heroku / hassle
Hi Oren, I couldn't find this information on the hassle github page. Do you know if Hassle is advised to used by Heroku? The page and the information on Heroku website seem to be 'outdated'. Heroku.com still mentions sass_on_heroku but it's github page says it's deprecated for pedro's Hassle. Cheers, Marcel On Mar 26, 6:40 pm, Oren Teich wrote: > hassle stores the stylesheets in varnish, cached for all dynos. > > Oren > > On Fri, Mar 26, 2010 at 6:30 AM, Marcel Overdijk > wrote: > > > > > As I understand sass_on_heroku or better hassle can be used to compile > > sass stylesheets to the /tmp folder on Heroku. I'm wondering what the > > findings are about using this approach. > > > I'm asking because of this mention in the Heroku docs. Especially the > > last sentence. > > > There are two directories that are writeable: ./tmp and ./log (under > > your application root). If you wish to drop a file temporarily for the > > duration of the request, you can write to a filename like > > #{RAILS_ROOT}/tmp/myfile_#{Process.pid}. There is no guarantee that > > this file will be there on subsequent requests (although it might be), > > so this should not be used for any kind of permanent storage. > > > Cheers, > > Marcel > > > -- > > You received this message because you are subscribed to the Google Groups > > "Heroku" group. > > To post to this group, send email to her...@googlegroups.com. > > To unsubscribe from this group, send email to > > heroku+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: sass_on_heroku / hassle
I threw a quick app together to show how haml and sass can work on heroku, along with formtastic and a nice jquery dynamic styles changer here: http://mccaffrey-formtastic.heroku.com/ The project is on github here http://github.com/jmccaffrey/formtastic_sass_on_heroku Let me know if you have any questions, I did this a few months ago... I hadn't heard of hassle, I'll have to check it out. -John On Fri, Mar 26, 2010 at 8:30 AM, Marcel Overdijk wrote: > As I understand sass_on_heroku or better hassle can be used to compile > sass stylesheets to the /tmp folder on Heroku. I'm wondering what the > findings are about using this approach. > > I'm asking because of this mention in the Heroku docs. Especially the > last sentence. > > There are two directories that are writeable: ./tmp and ./log (under > your application root). If you wish to drop a file temporarily for the > duration of the request, you can write to a filename like > #{RAILS_ROOT}/tmp/myfile_#{Process.pid}. There is no guarantee that > this file will be there on subsequent requests (although it might be), > so this should not be used for any kind of permanent storage. > > > Cheers, > Marcel > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to her...@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- -John -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: sass_on_heroku / hassle
hassle stores the stylesheets in varnish, cached for all dynos. Oren On Fri, Mar 26, 2010 at 6:30 AM, Marcel Overdijk wrote: > As I understand sass_on_heroku or better hassle can be used to compile > sass stylesheets to the /tmp folder on Heroku. I'm wondering what the > findings are about using this approach. > > I'm asking because of this mention in the Heroku docs. Especially the > last sentence. > > There are two directories that are writeable: ./tmp and ./log (under > your application root). If you wish to drop a file temporarily for the > duration of the request, you can write to a filename like > #{RAILS_ROOT}/tmp/myfile_#{Process.pid}. There is no guarantee that > this file will be there on subsequent requests (although it might be), > so this should not be used for any kind of permanent storage. > > > Cheers, > Marcel > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to her...@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.