I have created the default application and it loads via localhost
I have also updated execjs to 1.2.9 and installed nodes as initially
there was no javascript support. ( not sure why the windows script
server did not work though)
I am now working through the Getting Started with Rails, Blog
application at
I receive the following error when I try to access the application:
ExecJS::RuntimeError in Home#index
Showing C:/Sites/blog/app/views/layouts/application.html.erb where
line #6 raised:
‘C:\Program’ is not recognized as an internal or external command,
operable program or batch file.
(in C:/Sites/blog/app/assets/javascripts/home.js.coffee)
The files application.js and home.js.coffee have no code, they are
just the original templates.
The line " ‘C:\Program’ is not recognized as an internal or external
command, operable program or batch file." suggest that the space in a
path name is causing a problem.
I am now working through the Getting Started with Rails, Blog
operable program or batch file.
[…]
The line " ‘C:\Program’ is not recognized as an internal or external
command, operable program or batch file." suggest that the space in a
path name is causing a problem.
Any help or guidance would be welcomed.
Reinstall node into a directory without spaces.
As for no JScript support, does invoking cscript.exe from the command
line works?
As for no JScript support, does invoking cscript.exe from the command
line works?
–
Luis L.
Luis
good evening
cscript.exe does run from the command line from the application
directory
I have run this:
C:\Sites\blog>gem install node
Successfully installed node-0.0.2
1 gem installed
Installing ri documentation for node-0.0.2…
Installing RDoc documentation for node-0.0.2…
can you tell what programme or file is being looked for from line #6
<%= javascript_include_tag “application” %>
It is very frustrating as the error message is not pointing at a
solution. Does any one know what is causing the error?
What actually happens from this line?
<%= javascript_include_tag “application” %>
Thanks
Ted Finch wrote in post #1034656:
Reinstall node into a directory without spaces.
As for no JScript support, does invoking cscript.exe from the command line
works?
–
Luis L.
Luis
good evening
cscript.exe does run from the command line from the application
directory
I have run this:
C:\Sites\blog>gem install node
Successfully installed node-0.0.2
1 gem installed
Installing ri documentation for node-0.0.2…
Installing RDoc documentation for node-0.0.2…
can you tell what programme or file is being looked for from line #6
<%= javascript_include_tag “application” %>
The simplest way is to download the Windows installer from the Node
site. Since they update quickly I wont bother to put a direct link
its every easy to find from the home page. Two things to keep in
mind:
Be SURE to get a verision of Node >= 0.6.3.
Use the .msi to install. Otherwise you wont get npm
The installer simply copies Node.exe to a folder inside the Program
Files directory and updates your Path environment variable to point to
it.
If you want to put Node elsewhere you can move the folder from Program
Files, drop it where you like, and update the Path environment
variable.
Setting the Path variable is important, so heres how to do it
manually: go to System Properties in the Control Panel, Advanced, and
hit the Environment Variables button. Scroll down under System
variables to Path. Hit edit, and add your directory (say C:\bin
\node) to it. Be sure to separate it from the previous entry with a
semicolon."
The windows MSI installs to a directory below c:\Program Files and it
seems to be the space in the file path that causes the problem. I have
moved the nodejs directory to the root and updated the PATH variable
accordingly.
Dunno why are you having this level of issues. On a fresh installation
of Windows and RailsInstaller I was able to use execjs with the
Windows Scripting Host by default without issues.
There was no need to install node, at all.
For this to actually work on Windows (with
RailsInstaller) I had to first install node with official msi installer.
Then I copied node.exe to folder without whitespaces in its path (than
added this path to PATH variable of course) and then I also needed to
uninstall node from control panel / uninstall so that rails picked new
path.
Perhaps because you tried to do that in a open command prompt? Changes
to the PATH are not applied to existing sessions, that is true for
bash too.
For this to actually work on Windows (with
RailsInstaller) I had to first install node with official msi installer.
Then I copied node.exe to folder without whitespaces in its path (than
added this path to PATH variable of course) and then I also needed to
uninstall node from control panel / uninstall so that rails picked new
path.