I am currently in a web development class and we are using Ruby on Rails.
I am using Ruby v1.9.2 and Rails v3.1.1.
My initial problem started when I tried to execute 'rails server'.
I would get the following error:
C:\Sites\rorProjects\basicRoRProject>rails server
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/execjs-1.2.13/lib/execjs/runtimes.rb:47:in `autodetect': Could not find a JavaScript runtime.
See https://github.com/sstephenson/execjs for a list of available runtimes.(ExecJS::RuntimeUnavailable)
I have done some reading and the general consensus is to install the gems 'execjs' and 'therubyracer'. 'execjs' installed just fine, however when I tried to install 'therubyracer' I got the following error:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing therubyracer: ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.
Check the mkmf.log file for more details.
You may need configuration options.
I then did some more reading and found a couple of people said to check that they had the gem 'libv8', which was required for 'therubyracer'. I did that and discovered that I didn't have it, so I then went to install that and got the same error that I did for 'therubyracer'.
I'm at a loss to think of anything else to do. Any help would be greatly appreciated.
Thanks guys!
THIS PROBLEM HAS BEEN SOLVED.
So, with the help of one of my classmates who had a similar problem, I installed Node.js using the Windows installer (this gave me a JavaScript run-time environment). I then added it to the path in the local variables.
So, with the help of one of my classmates who had a similar problem, I installed Node.js using the Windows installer. I then added it to the path in the local variables.
Related
I am a very early beginner to coding. I downloaded VS Code so that I could, you know, have somewhere to code in Java. However, I keep getting these two errors telling me these two extensions that I already have installed on VS Code are not working here are the error messages. I already searched through the odds and ends of StackOverflow and have tried everything, and nothing has worked. Any help would be appreciated.
I inputted some code into settings.json under a "java.configuration.runtimes" thing but nothing in it worked. I conformed it to my installation directories and current Java version
Do you have a JDK (Java Development Kit) installed?
If you are on Windows, you can check by clicking on the start button, and search through applications and programs for a Java folder.
If you are on MacOS or Linux, you can open up the terminal/command line and type in "java -version" and if it is properly installed, it will display the version.
If you do not find a JDK installed, install one from https://www.oracle.com/ca-en/java/technologies/downloads/
Download and install the Coding Pack for Java.
It would be helpful to follow this documentation to get started.
Okay, I'm not a programmer first of all, so I have 0 idea what is happening. Please go easy on me..
The project I'm trying to compile is a web browser extension (or webpack idk). There is a file called Installer.bat with the "npm i" command and a file called compiler.bat with the "npx webpack" command.
Now, there is no issue within the project, because it worked on the same machine with different windows 7 with no problems. On this ystem (32-bit windows 7 by the way) I keep getting the following error when running compiler.bat file :
Error: write EOF
at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
I know I should probably link the webpack.config.js code here, but it's pretty big and I'm thinking that this error is ocurring because of something entirely different anyway. I will say that during the installation of nodejs, the additional chocolatey packages failed because of problems with powershell/TLS 1.2 or whatever. I do have python 3.6 installed though. Not sure if that matters but yeah. And also, my friend who downloaded it on his machine has also stumbled across an error with the compiler.bat but it was a EPIPE error.
Any ideas? Do I need to install something else besides NodeJS? This project isn't mine and it always compiled with no problems in the past (on the same machine but a different windows 7 though). I tried to look for answers for weeks, but found nothing. Mostly people just had issues with their project CODE not the nodejs or modules. I'm almost losing hope and the author of the project doesn't want to communicate for whatever reason.
EDIT: Apparently didn't have java sdk 8 installed, fixed the issue.
Upon searching on the internet, I found out that nodeclipse plugin for NodeJS development in Eclipse. I have tried to install it but I keep getting this error:
Unable to read repository at http://www.nodeclipse.org/updates/.
http://www.nodeclipse.org/updates/ is not a valid repository location.
http://nodeclipse.org/ is also not available.
I have tried Enide also but it is also showing the same error.
Can anyone tell me a good platform for NodeJS development or how to install nodeclipse.
It looks like http://nodeclipse.org/ isn't reachable, but http://www.nodeclipse.org/ is. Have you tried that?
Nodeclipse site was unavailable for few days.
Anyone can download offline packages from http://sourceforge.net/projects/nodeclipse/files/
or raise an issue at https://github.com/Nodeclipse/
My RoR application falls down with the following error:
ActionView::Template::Error (undefined method `attributes_for' for
Sprockets::CachedEnvironment:0x00000005baf3d8
As I found out this error happens when the javascript in the html.erb template is rendering. Also I noticed that in all templates where it happens exists tinyMCE initialization command.
I suppose, that it is something environment specific, because at my development machine it works fine and at production server it also works fine. I began to receive this message when I decided to install 2nd production server for testing purposes. I installed CentOS 6 + rvm + ruby 2.2.0 (the same as at 1st production server). Maybe I missed to install something?
As the problem is related to tinymce and sprockets I am guessing that you are using tinymce-rails GEM.
The tinymce-rails GEM does not work fine with sprockets >= 3. It is using some API that was removed in version 3.
If you still want to use tinymce-rails GEM, please lock sprockets to ~> 2. This has solved problem for me.
The perfect solution would be to make a pull request for tinymce-rails to make it work with the latest sprockets, but that's whole nother story.
I just followed this guide: https://github.com/walmartlabs/thorax-seed/blob/master/README.md and encountered a strange issue on a windows maschine. When i run
npm start
there is a lot of work done by bower (it loads the dependencies I guess), but in the end I get some strange errors:
Command line output: http://pastebin.com/6exW5RGT
Contents of npm-debug: http://pastebin.com/bUmgKM8t
bower.json contents: http://pastebin.com/Vf1ffMDa
I don't know where to ask for help (I guess it's also windows specific, as I wasn't able to google this error), so I try it here.
In the meanwhile, there is a Yeoman based generator for Thorax that might help you: https://github.com/walmartlabs/generator-thorax
Also, I am trying to setup a Google group to improve discussions on Thorax: https://groups.google.com/forum/?hl=en#!forum/thoraxjs