-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I use this gem with backbone-rails gem ? #30
Comments
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 |
I tried to install therubyracer gem: error |
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> |
Ok, I installed NodeJS |
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 |
|
|
But there already is a reference to nodeJS: Files \ Git \ cmd; C: \ Users \ roma \ AppData \ Roaming \ npm; C: \ Program Files \ nodejs \ |
How do you start your server? From the command line or an editor? |
From the command line |
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. |
Have you found a solution? |
ExecJS::Runtimes::Node.available? return true |
You're mixing the runtimes. |
|
Have you run |
|
It still tries to install the Ruby Racer. Try |
same shit |
Sorry, you should comment it, since it's not needed. |
lol =) |
There should be no |
Template why it is transformed into index.hamlc.js |
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. |
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. |
ok, i wrote you private message |
Thanks, I cloned your repo and found the problem: You had the templates |
I just add two gems in my Gemfile and create one template to test and.. it doesn't work
Gemfile
ExecJS::ProgramError in Main#index
Showing C:/preject/app/views/layouts/application.html.haml where line #6 raised:
TypeError: Object doesn't support this property or method
(in C:/preject/app/assets/javascripts/backbone/templates/profile/index.jst.hamlc)
In index.jst.hamlc just:
.qwe test123
The text was updated successfully, but these errors were encountered: