You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 10, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 10, 2018. It is now read-only.
CSCRIPT.EXE doesn't work out-of-the-box on Windows 8 Consumer Preview #81
Getting Rails to work on Windows 8 CP has been challenging...the biggest hurdle has been that ExecJS isn't working. I finally tracked it down to something related to the character encoding: if I remove the //U flag to cscript.exe and change the output encoding to UTF-8 in runtimes.rb, it works again. Not sure whether this is a problem with Ruby on Win8, or with cscript.exe on Win8.
Hi, I'm on my first rail installation and unfortunately I made the mistake of using Windows 8 CP as my development machine. I would be very great-full if you could detail a bit on how to remove the //U flag to cscript.exe and change the output encoding..
What I did at this point was to follow the discussion here: https://gist.github.com/rails/rails/issues/2880 and pull this: gem 'execjs', :git => 'git://github.com/kennyj/execjs.git', :branch => 'rails_issue_2880' by modifying my Gemfile and then bundle update..
Sorry it took me so long to reply...I only have the change on my home PC, and I only remembered your message while at work. :-/
The fix I made was to edit lib/execjs/runtimes.rb (under the execjs gem's path...c:\Ruby192\lib\ruby\gems\1.9.1\gems\execjs-1.3.0 on my machine) so that the JScript runtime is defined like so:
If I recall correctly, I think I removed the //U parameter from the :command string, and changed the :encoding string to read "UTF-8" rather than "UTF-16LE".
Same issue, same resolution works on Windows 8 RTM. Rails 3.2.6, Ruby 1.9.3, execjs 1.4.0 .
Thanks jediry, couldn't find this solution anywhere else. Everything else just said "install node.js", but I didn't want to install something else when the Windows Script Host is a supported runtime.
I'm seeing the same thing and I also can get everything working with this fix on Windows 8 RTM, Rails 3.2.8, and Ruby 1.9.3.
I've put together a branch that encompasses this fix: jmataya/execjs@72ddd8edeb1cd9fec2ed976f1f863fde5b551b74. Feel free to use it. I also tested against Windows 7 SP1 successfully.
Once I figure out why a couple test cases are failing (see jmataya/execjs#1), I'll submit a pull request to bring this back in.
To use this in your project Gemfile: gem 'execjs', :git => 'git://github.com/jmataya/execjs.git', :branch => 'issue-81'
Unfortunately that branch didn't work for me, but I did correct the issue by installing nodejs(from http://nodejs.org/) and restarting windows; in case that helps anyone else until the gem is fixed/updated.
Hi, I believe that 9 months ago when first dabbling with this I eventually made it work with jediry fix; that is using windows script host, but I then switched to linux.
Today, reviewing this issue I installed nodejs and rebooted and it worked this way also. Hope this somehow helps.
Too bad this isn't working out of the box yet with rails installer and execjs and with Windows Script Host.
Hi guys I'm using Surface Pro and when I try to do the simple getting started guide from http://guides.rubyonrails.org/getting_started.html I get below error after I update config/routes.rb and try to load Hello Rails:
I installed the package using railsinstaller-2.2.1 and then updated rails to version 4 using gem install. Any advise would be greatly appreciated as I haven't been able to run a simple Hello Rails since the last time I did rails in my uni 4-5 years ago :( ... thanks.
Hi guys I'm using Surface Pro and when I try to do the simple getting
started guide from http://guides.rubyonrails.org/getting_started.html I
get below error after I update config/routes.rb and try to load Hello Rails:
I installed the package using railsinstaller-2.2.1 and then updated rails
to version 4 using gem install. Any advise would be greatly appreciated as
I haven't been able to run a simple Hello Rails since the last time I did
rails in my uni 4-5 years ago :( ... thanks.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/81#issuecomment-20738254
.
For me, this happens on Win7 in the standard command prompt, as well as in Cmder.
@belozi How to do I "go to the Gemfile"? I ran gem 'execjs', '1.2.4' from both C:\Ruby193\lib\ruby\gems\1.9.1\gems and C:\Ruby193\lib\ruby\gems\1.9.1\gems\execjs-2.2.2, but I got an error "Unknown command execjs" each time.
Also, how do I ensure that a given package uses this version of ExecJS?
@DSAMPAT I did a fresh reinstall with 2.1.6 and ExecJS works fine as it should expect to behave with a single bundle install. Earlier versions gave the same exact error when ExecJS was incorrectly parsing the wrong thing. Reverting to 1.8.0 works if when working previous versions of Ruby.
@rodrigoargumedo Unless we compare bundle show we wont know for sure what other differences we may have as our apps may have other gems or dependencies that could use ExecJS as well.
$ gem -v
2.4.8
$ gem update --system
Latest version currently installed. Aborting.
I am having the same problem.
I am new into programming so my needs and the web I build might not influence heavily with this problem. But still, I can not run this line properly.
I am having the same problem.
I am new into programming so my needs and the web I build might not
influence heavily with this problem. But still, I can not run this line
properly.
Activity
floringogianu commentedon May 8, 2012
Hi, I'm on my first rail installation and unfortunately I made the mistake of using Windows 8 CP as my development machine. I would be very great-full if you could detail a bit on how to remove the //U flag to cscript.exe and change the output encoding..
What I did at this point was to follow the discussion here: https://gist.github.com/rails/rails/issues/2880 and pull this: gem 'execjs', :git => 'git://github.com/kennyj/execjs.git', :branch => 'rails_issue_2880' by modifying my Gemfile and then bundle update..
Thanks!
jediry commentedon May 20, 2012
Sorry it took me so long to reply...I only have the change on my home PC, and I only remembered your message while at work. :-/
The fix I made was to edit lib/execjs/runtimes.rb (under the execjs gem's path...c:\Ruby192\lib\ruby\gems\1.9.1\gems\execjs-1.3.0 on my machine) so that the JScript runtime is defined like so:
If I recall correctly, I think I removed the //U parameter from the :command string, and changed the :encoding string to read "UTF-8" rather than "UTF-16LE".
leighst commentedon Oct 28, 2012
Same problem. Worked for me. Time to move to Linux for dev.
pottsk commentedon Oct 30, 2012
Same issue, same resolution works on Windows 8 RTM. Rails 3.2.6, Ruby 1.9.3, execjs 1.4.0 .
Thanks jediry, couldn't find this solution anywhere else. Everything else just said "install node.js", but I didn't want to install something else when the Windows Script Host is a supported runtime.
Full execjs Runtimes.rb listing: https://github.com/sstephenson/execjs/blob/master/lib/execjs/runtimes.rb
Working runtimes.rb :
Non-working / Default runtimes.rb :
This is the original error page I was seeing:
jmataya commentedon Oct 30, 2012
I'm seeing the same thing and I also can get everything working with this fix on Windows 8 RTM, Rails 3.2.8, and Ruby 1.9.3.
I've put together a branch that encompasses this fix: jmataya/execjs@72ddd8edeb1cd9fec2ed976f1f863fde5b551b74. Feel free to use it. I also tested against Windows 7 SP1 successfully.
Once I figure out why a couple test cases are failing (see jmataya/execjs#1), I'll submit a pull request to bring this back in.
To use this in your project Gemfile:
gem 'execjs', :git => 'git://github.com/jmataya/execjs.git', :branch => 'issue-81'jeremychurch commentedon Nov 5, 2012
Unfortunately that branch didn't work for me, but I did correct the issue by installing nodejs(from http://nodejs.org/) and restarting windows; in case that helps anyone else until the gem is fixed/updated.
floringogianu commentedon Feb 2, 2013
Hi, I believe that 9 months ago when first dabbling with this I eventually made it work with jediry fix; that is using windows script host, but I then switched to linux.
Today, reviewing this issue I installed nodejs and rebooted and it worked this way also. Hope this somehow helps.
Too bad this isn't working out of the box yet with rails installer and execjs and with Windows Script Host.
lvnilesh commentedon Feb 19, 2013
On Win8 RTM - workaround provided by @pottsk works for me. Thanks.
letrunghieu commentedon Feb 20, 2013
Yep, the solution of @pottsk work for me (win8 pro 64bit - execjs 1.4.0). Thanks a lot.
sunnyak247 commentedon May 10, 2013
The solution provided by @pottsk worked for me. I am using a windows 8, 64 bit operating system. Thanks a lot.
updated to rspec-rails 2.13 to resolve broken use_transactional_fixtures
kurevin commentedon May 28, 2013
Bump still not fixed....but looks like this repo is dead, no commits for over a year.
jaeezzy commentedon Jul 10, 2013
Hi guys I'm using Surface Pro and when I try to do the simple getting started guide from http://guides.rubyonrails.org/getting_started.html I get below error after I update config/routes.rb and try to load Hello Rails:
I installed the package using railsinstaller-2.2.1 and then updated rails to version 4 using gem install. Any advise would be greatly appreciated as I haven't been able to run a simple Hello Rails since the last time I did rails in my uni 4-5 years ago :( ... thanks.
prusswan commentedon Jul 10, 2013
best advice: don't use Windows for RoR
On Wed, Jul 10, 2013 at 8:23 PM, jaeezzy notifications@github.com wrote:
jaeezzy commentedon Jul 12, 2013
installed node.js and restarted computer and it ran the Hello rails fine..
15 remaining items
KatieK2 commentedon Oct 17, 2014
For me, this happens on Win7 in the standard command prompt, as well as in Cmder.
@belozi How to do I "go to the Gemfile"? I ran
gem 'execjs', '1.2.4'from bothC:\Ruby193\lib\ruby\gems\1.9.1\gemsandC:\Ruby193\lib\ruby\gems\1.9.1\gems\execjs-2.2.2, but I got an error "Unknown command execjs" each time.Also, how do I ensure that a given package uses this version of ExecJS?
belozi commentedon Nov 11, 2014
@KatieK2 It would be a part of your Rails app.
PS- sorry I took so long to respond, I didn't realize that this was here. :)
javadKarbasian commentedon Mar 23, 2015
it doesn't work for me with version 2.4 execjs...
zhongyi-tong commentedon Mar 30, 2015
doesn't work for version 2.4 execjs +1
rodrigoargumedo commentedon Jun 21, 2015
+1
DSAMPAT commentedon Sep 18, 2015
For windows users, this may work. There is a problem with coffee-script-source >1.9.0 running on windows.
It seems you have to add this to your gemfile:
gem 'coffee-script-source', '1.8.0'
then do
bundle update coffee-script-source
rodrigoargumedo commentedon Sep 18, 2015
Or you could do
gem update --systemfor the latest version of RubyGems and reinstall execjs? I tried this and it worked like a charm.DSAMPAT commentedon Sep 18, 2015
@rodrigoargumedo I tried all the above options, and also mixed up a few combinations of them, till I found this http://stackoverflow.com/questions/28241981/rails-4-execjsprogramerror-in-pageswelcome and had done multiple system gem updates and bundle installs and updates.
I reverted all my trials and downgraded my coffee-script-source and it works. Posting here to help out anyone else, who may have a similar issue.
Updating files in vendor/cache
Removing outdated .gem files from vendor/cache
Bundle updated!
rodrigoargumedo commentedon Sep 18, 2015
@DSAMPAT I did a fresh reinstall with 2.1.6 and ExecJS works fine as it should expect to behave with a single
bundle install. Earlier versions gave the same exact error when ExecJS was incorrectly parsing the wrong thing. Reverting to 1.8.0 works if when working previous versions of Ruby.DSAMPAT commentedon Sep 18, 2015
@rodrigoargumedo Unless we compare bundle show we wont know for sure what other differences we may have as our apps may have other gems or dependencies that could use ExecJS as well.
$ gem -v
2.4.8
$ gem update --system
Latest version currently installed. Aborting.
$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]
$ rails -v
Rails 4.2.3
Like I said, Posting here to help out anyone else, who may have a similar issue.
codelearner777 commentedon Nov 1, 2015
Hello,
I am having the same problem.
I am new into programming so my needs and the web I build might not influence heavily with this problem. But still, I can not run this line properly.
so far, I just delete this line in application.html.erb so I can follow some tutorials.
could some one help me?
my setup is on


Win 8.1
editing jscript.rb does not solve the problem
RichIsOnRails commentedon Nov 2, 2015
Just install node.js. also see
https://richonrails.com/articles/ruby-2-2-on-windows for more info on
Rails/Windows.
On Nov 1, 2015 12:34 PM, "codelearner777" notifications@github.com wrote:
codelearner777 commentedon Nov 3, 2015
@RichIsOnRails , yupp...I installed node.JS and it works! Thanks!
Bassmint123 commentedon Sep 28, 2016
UPDATE: Since Windows 10 with Rails 5.0.0 and Ruby 2.3 has not been mentioned on this thread:
RichIsOnRails commentedon Sep 28, 2016
@Bassmint123 yes, these days you basically have to install Node.js. There aren't really any easy alternatives unless you use WSL.