GithubHelp home page GithubHelp logo

Comments (27)

netzpirat avatar netzpirat commented on August 22, 2024

I've used both gems in a project without problems. What JS runtime are you using? I suggest to test with the Ruby racer by uncomment gem 'therubyracer' or install NodeJS.

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

I tried to install therubyracer gem: error
I think it's because my platform is windows.

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

According to the error message it needs Python for building libv8. The other option is to use install NodeJS, they have a windows installer. You can verify the ExecJS runtime in the console:

$ irb
> require 'execjs'
> ExecJS.runtime
=> #<ExecJS::RubyRacerRuntime:0x007fae2b0ba6b8>

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

Ok, I installed NodeJS
verify the ExecJS
But, error is still exist.

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

Somehow the output here is missing the info, but I got it in the notification email:

irb(main):001:0> require 'execjs'
=> true
irb(main):002:0> ExecJS.runtime
=> #<ExecJS::ExternalRuntime:0x2386db8 @name="JScript", @command="cscript //E:jscript //Nologo //U", @runner_path="C:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-1.3.0/lib/execjs/support/jscript_runner.js", @test_args=nil, @test_match=nil, @encoding="UTF-16LE", @binary="cscript //E:jscript //Nologo //U">
irb(main):003:0> ExecJS.runtime

You still have JScript as engine selected. Make sure Node is in your path, so it can be detected.

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

Node is in your path
How to realize it? I'am newbie =)

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

%PATH% is a list of directories where Windows will search for executables, so you have to add the location where the node command can be found.

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

But there already is a reference to nodeJS: Files \ Git \ cmd; C: \ Users \ roma \ AppData \ Roaming \ npm; C: \ Program Files \ nodejs \

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

How do you start your server? From the command line or an editor?

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

From the command line

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

Make sure the path is right in Ruby and the node runtime is available:

$ pry
[1] pry(main)> ENV['PATH']
=> "/usr/local/bin:/usr/local/share/npm/bin:/Users/michi/node_modules/.bin:/Users/michi/.bin:/Users/michi/.rvm/gems/ruby-1.9.3-p125/bin:/Users/michi/.rvm/gems/ruby-1.9.3-p125@global/bin:/Users/michi/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/michi/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/share/npm/bin"
[2] pry(main)> require 'execjs'
=> true
[3] pry(main)> ExecJS::Runtimes::Node.available?
=> true

According to ExecJS, JScript is the least desired runtime, guess they have good reason to do so.

If you still have problem getting the node runner recognized, have a look at the relevant lines for locating it in ExecJS.

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

Have you found a solution?

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

ExecJS::Runtimes::Node.available? return true
but libv8 gem is not established

appears not just me: 1 2 3

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

You're mixing the runtimes. libv8 is a dependency for the Ruby racer, but when you've NodeJS as runtime, you don't need the Ruby racer, so you can uncomment gem "therubyracer" in your Gemfile.

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

uncomment gem "therubyracer" ? it's uncommented

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

Have you run bundle after uncommenting? You can see which Gem has it as dependency within Gemfile.lock.

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

Have you run bundle after uncommenting? yes and Gemfile.lock

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

It still tries to install the Ruby Racer. Try bundle update.

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

same shit

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

Sorry, you should comment it, since it's not needed.

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

lol =)

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

There should be no .hamlc extension anymore after it has been compiled. How did you name your template?

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

Template why it is transformed into index.hamlc.js
How did you name your template? index.jst.hamlc

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

You may have a unicorn in between your browser and the server, that dislocates the template with a space-time bending. It's just a guess, since I don't have more information.

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

Since I don't have the patience anymore to ask thousand of questions to get all the needed information that let me help you, I suggest that you put the project on GitHub and send me the link, so I can have a quick look.

from haml_coffee_assets.

milushov avatar milushov commented on August 22, 2024

ok, i wrote you private message

from haml_coffee_assets.

netzpirat avatar netzpirat commented on August 22, 2024

Thanks, I cloned your repo and found the problem: You had the templates index.jst.ejs and index.jst.hamlc in the same folder. This is not possible, since both files will be compiled to index.js. I renamed index.jst.hamlc simply to index2.jst.hamlc and the template was compiled fine and server through the asset pipeline.

from haml_coffee_assets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.