Forums de discussion

Unable to load Sass.on Centos 5.6, 5.7

Tibor Kiss, modifié il y a 12 années.

Unable to load Sass.on Centos 5.6, 5.7

Junior Member Publications: 52 Date d'inscription: 29/01/07 Publications récentes
I have a Liferay CE 6.1GA which runs on Centos 6.0, SL 6.0 but when I deploy to Centos 5.6 and 5.7 I see this error, as a result the css are screwed up.


Unable to load Sass. Please install it with one of the following commands:
  gem install sass --pre
LoadError: no such file to load -- file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/ruby-gems.jar!/gems/sass-3.1.7/lib/sass/../sass
  require at org/jruby/RubyKernel.java:1038
  require at file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/jruby.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb
:29
   (root) at file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/ruby-gems.jar!/gems/sass-3.1.7/lib/sass/version.rb:3
  require at org/jruby/RubyKernel.java:1038
  require at file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/jruby.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb
:29
   (root) at file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/ruby-gems.jar!/gems/sass-3.1.7/lib/sass/version.rb:9
  require at org/jruby/RubyKernel.java:1038
  require at file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/ruby-gems.jar!/gems/sass-3.1.7/lib/sass.rb:32
   (root) at file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/ruby-gems.jar!/gems/compass-0.11.5/lib/compass/dependencies.rb:6
  require at org/jruby/RubyKernel.java:1038
   (root) at file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/ruby-gems.jar!/gems/compass-0.11.5/lib/compass/dependencies.rb:5
     each at org/jruby/RubyArray.java:1603
   (root) at file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/ruby-gems.jar!/gems/compass-0.11.5/lib/compass.rb:4
  require at org/jruby/RubyKernel.java:1038
   (root) at file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/ruby-gems.jar!/gems/compass-0.11.5/lib/compass.rb:1
09:52:25,913 ERROR [DynamicCSSFilter:181] Unable to parse SASS on CSS /usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/omixon-theme/css/main.css
org.jruby.embed.EvalFailedException: (LoadError) no such file to load -- file:/usr/share/tomcat/instance2/apache-tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/ruby-gems.jar!/gems/sass-3.1.7/lib/sass/../sass
        at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:127)


Since the Centos 5.7 has a little bit older ruby packages
ruby-1.8.5-22.el5_7.1 ruby-ri-1.8.5-22.el5_7.1 ruby-libs-1.8.5-22.el5_7.1 ruby-docs-1.8.5-22.el5_7.1 ruby-rdoc-1.8.5-22.el5_7.1 rubygems-1.3.2-2.el5.rf ruby-irb-1.8.5-22.el5_7.1 ruby-devel-1.8.5-22.el5_7.1

I removed these packages, then I installed ruby and gems just manually
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p357.tar.gz
tar xvzf ruby-1.8.7-p357.tar.gz 
cd ruby-1.8.7-p357
./configure --enable-pthread
make
make install
cd
wget http://rubyforge.org/frs/download.php/75711/rubygems-1.8.15.tgz
tar xzvf rubygems-1.8.15.tgz 
cd rubygems-1.8.15
ruby setup.rb


Also from tomcat user I see the correct versions
-bash-3.2$ ruby -v
ruby 1.8.7 (2011-12-28 patchlevel 357) [i686-linux]
-bash-3.2$ gem -v
1.8.15
-bash-3.2$ 


I restarted tomcat, but the main Sass loading error still persists.

I don't know the internal details of ruby-gems.jar. how I see there is a complete gems.

Anyone saw this error?
thumbnail
Lennart Job, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

New Member Publications: 3 Date d'inscription: 01/04/11 Publications récentes
I'm experiencing the same problems on Debian 6.0 Squeeze and Liferay 6.1 GA 1. I've tried installing rubygems (apt-get install rubygems) and then installing sass (gem install sass --pre). That didn't change anything...
The same theme works just fine on the development system running Ubuntu 11.10...

Does anyone have a solution to this?
thumbnail
Mika Koivisto, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

Liferay Legend Publications: 1519 Date d'inscription: 07/08/06 Publications récentes
It's using jRuby so installing ruby on the system should affect it at all. All it needs should be in the jar but I really don't know how it works. I haven't had any Saas issues on server that's running Ubuntu 9.04 and it doesn't even have ruby installed.
Satish Bhor, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

New Member Publications: 17 Date d'inscription: 21/12/11 Publications récentes
I am facing same issue with my liferay 6.1, i am using centos 6. Has anyone found any solution yet?
Tibor Kiss, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

Junior Member Publications: 52 Date d'inscription: 29/01/07 Publications récentes
Satish Bhor:
I am facing same issue with my liferay 6.1, i am using centos 6. Has anyone found any solution yet?

Interesting is that with Centos 6 based system I had no such problems.
Finally, my problem has been sorted out by throwing away the old Centos image. Since I am using Amazon EC2 for that, I opted to use the Amazon Linux for now, which is RHEL6 based (like Centos 6) and the problem just disappeared. But don't ask me to explain what exactly is the difference with regard to this problem.
Since then, I already went online with the liferay.
thumbnail
Jonas Fonseca, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

New Member Publications: 11 Date d'inscription: 20/10/10 Publications récentes
Tibor Kiss:
Finally, my problem has been sorted out by throwing away the old Centos image. Since I am using Amazon EC2 for that, I opted to use the Amazon Linux for now, which is RHEL6 based (like Centos 6) and the problem just disappeared. But don't ask me to explain what exactly is the difference with regard to this problem.


In my experience it is related to the JRE. I've had problems with both OpenJDK 6 and OpenJDK 7. Those problems were resolved by installing the Oracle/Sun JRE 6.

I've updated this issue with my findings: http://issues.liferay.com/browse/LPS-26199
Tibor Kiss, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

Junior Member Publications: 52 Date d'inscription: 29/01/07 Publications récentes
Jonas Fonseca:
In my experience it is related to the JRE. I've had problems with both OpenJDK 6 and OpenJDK 7. Those problems were resolved by installing the Oracle/Sun JRE 6.

Myself I installed the same Sun jdk on CentOS and Amazon Image and the CentOS had the SASS problem while Amazon Linux was working fine.
thumbnail
André Bunse, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

Junior Member Publications: 85 Date d'inscription: 16/03/12 Publications récentes
i had the same problem after creating two scripts for start/stop tomcat server from the command line

first i use this syntax

set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
call "%EXECUTABLE%" start

my script was call over global PATH and was found in %CATALINA_HOME%

this causes the error with SASS and jRuby

after i change my script to

cd %CATALINA_HOME%\bin
call "catalina.bat" start

everything was fine


Keep on coding
André
thumbnail
Arno Broekhof, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

Junior Member Publications: 42 Date d'inscription: 18/10/11 Publications récentes
The problem is most likely that jruby isn't in you're path and that rubygems isn't using jruby but default ruby

can you post you're path

( from the command line type: echo $PATH )
Nikos R, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

New Member Publications: 6 Date d'inscription: 01/02/12 Publications récentes
I have the same problem on Centos 5.5 only when Tomcat is running as a service.
Still trying to figure out the solution.

EDIT:
The error occurs when the server starts in the service as follows:
/bin/su tomcat $CATALINA_HOME/bin/startup.sh

By replacing this with the following solves the problem in my case:
/bin/su tomcat -c "cd ${CATALINA_HOME}/bin; ./startup.sh;"

Hope this helps.
thumbnail
David H Nebinger, modifié il y a 12 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

Liferay Legend Publications: 14914 Date d'inscription: 02/09/06 Publications récentes
Would seem to indicate that it's looking for a path relative to the current location, rather than a fully-qualified path.

The usage of the -c is changing your working dir, so when the relative path is used, it will load.

This might not be a Liferay thing and could perhaps be an installation thing? Did you use relative paths in any of your properties files?
Charles Forsythe, modifié il y a 11 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

New Member Publications: 6 Date d'inscription: 21/04/12 Publications récentes
I can definitively report that the problem is not CentOS 5.7, and is, in fact, only related to the working directory. I am running on CentOS 5.7 (yes, I know it is old) and encountered this problem. All I changed was my startup script. In the old script I had this:

    echo -n "Starting Liferay: "

    $CATALINA_HOME/bin/jsvc \
...

I changed it to this:

    echo -n "Starting Liferay: "

    cd $CATALIINA_HOME/bin

    ./bin/jsvc \
...

...and all of the CSS problems ceased. Apparently Liferay 6.1 requires that the JVM's working directly be $CATALINA_HOME/bin. This seems to me to be a bug.
thumbnail
Ray Augé, modifié il y a 11 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

Liferay Legend Publications: 1197 Date d'inscription: 08/02/05 Publications récentes
Ok for all those with SASS issues, change the value of:

    scripting.jruby.load.paths=\
        META-INF/jruby.home/lib/ruby/site_ruby/1.8,\
        META-INF/jruby.home/lib/ruby/site_ruby/shared,\
        META-INF/jruby.home/lib/ruby/1.8,\
        gems/chunky_png-1.2.1/lib,\
        gems/compass-0.11.5/lib,\
        gems/fssm-0.2.7/lib,\
        gems/sass-3.1.7/lib,\
        file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/chunky_png-1.2.1/lib,\
        file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/compass-0.11.5/lib,\
        file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/fssm-0.2.7/lib,\
        file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/sass-3.1.7/lib


Change it to:

    scripting.jruby.load.paths=\
        classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8,\
        classpath:/META-INF/jruby.home/lib/ruby/site_ruby/shared,\
        classpath:/META-INF/jruby.home/lib/ruby/1.8,\
        classpath:/gems/chunky_png-1.2.1/lib,\
        classpath:/gems/compass-0.11.5/lib,\
        classpath:/gems/fssm-0.2.7/lib,\
        classpath:/gems/sass-3.1.7/lib


This applies to both 6.1 and trunk.
thumbnail
Hitoshi Ozawa, modifié il y a 11 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
To all those who are new to liferay, Augé's replies mean to create portal-ext.properties file if you haven't created it yet and enter the content below "Change it to:".
thumbnail
Ray Augé, modifié il y a 11 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

Liferay Legend Publications: 1197 Date d'inscription: 08/02/05 Publications récentes
Yes, thank you Hitoshi! emoticon
Chirag Patel, modifié il y a 11 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

New Member Publications: 2 Date d'inscription: 09/07/12 Publications récentes
I tried the change Ray suggested but get a different error.

10:13:35,554 ERROR [DynamicCSSFilter:181] Unable to parse SASS on CSS
org.jruby.embed.EvalFailedException: (NameError) uninitialized constant Sass
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:127)
at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1231)
at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1224)
at com.liferay.portal.scripting.ruby.RubyExecutor.eval(RubyExecutor.java:148)
at com.liferay.portal.scripting.ruby.RubyExecutor.eval(RubyExecutor.java:105)
at com.liferay.portal.servlet.filters.dynamiccss.DynamicCSSUtil._parseSass(DynamicCSSUtil.java:295)
at com.liferay.portal.servlet.filters.dynamiccss.DynamicCSSUtil.parseSass(DynamicCSSUtil.java:138)
at com.liferay.portal.servlet.filters.dynamiccss.DynamicCSSFilter.getDynamicContent(DynamicCSSFilter.java:144)
at com.liferay.portal.servlet.filters.dynamiccss.DynamicCSSFilter.processFilter(DynamicCSSFilter.java:208)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.minifier.MinifierFilter.processFilter(MinifierFilter.java:467)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:414)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
at com.ibm.ws.webcontainer.servlet.FileServletWrapper.handleRequest(FileServletWrapper.java:533)
at com.ibm.ws.webcontainer.servlet.StaticFileServletWrapperImpl.handleRequest(StaticFileServletWrapperImpl.java:135)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.__handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: org.jruby.exceptions.RaiseException: (NameError) uninitialized constant Sass
Chirag Patel, modifié il y a 11 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

New Member Publications: 2 Date d'inscription: 09/07/12 Publications récentes
Just to provide an update, I was able to get this to work after adding the entries that Ray suggested along with the file entires. Thanks for your helpfull suggestions.

scripting.jruby.load.paths=\
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8,\
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/shared,\
classpath:/META-INF/jruby.home/lib/ruby/1.8,\
classpath:/gems/chunky_png-1.2.1/lib,\
classpath:/gems/compass-0.11.5/lib,\
classpath:/gems/fssm-0.2.7/lib,\
classpath:/gems/sass-3.1.7/lib,\
file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/chunky_png-1.2.1/lib,\
file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/compass-0.11.5/lib,\
file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/fssm-0.2.7/lib,\
file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/sass-3.1.7/lib
thumbnail
Peter Siman, modifié il y a 8 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

New Member Publications: 10 Date d'inscription: 13/05/09 Publications récentes
Just in case... If somebody has the same issue on Liferay CE 6.2.3 GA4. These are the right libraries versions that shoud be put in the portal-ext.properties file:


scripting.jruby.load.paths=\
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8,\
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/shared,\
classpath:/META-INF/jruby.home/lib/ruby/1.8,\
classpath:/gems/chunky_png-1.2.9/lib,\
classpath:/gems/compass-0.12.2/lib,\
classpath:/gems/fssm-0.2.10/lib,\
classpath:/gems/sass-3.2.12/lib,\ 
file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/chunky_png-1.2.9/lib,\ 
file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/compass-0.12.2/lib,\ 
file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/fssm-0.2.10/lib,\ 
file:${liferay.lib.portal.dir}ruby-gems.jar!/gems/sass-3.2.12/lib


Tested on Centos 7.
thumbnail
Camilo Andrés Gutierrez, modifié il y a 7 années.

RE: Unable to load Sass.on Centos 5.6, 5.7

New Member Publications: 4 Date d'inscription: 01/02/12 Publications récentes
Thank you so much... It works