Object doesn't support this property or method Rails Windows 64bit
Contrary to popular belief, Rails is NOT cross platform compatible as they claim. If it was it would work on windows, out of the box. Like you I have tried every available option.
This was solved using Ruby 2.1.5p273/Rails 4.2.0
I changed execjs to use UTF-8 with jscript, no effect. This was done by editing C:\RailsInstaller\Ruby2.1.0\lib\ruby\gems\2.1.0\gems\execjs-2.2.2\lib\execjs\runtimes.rb changing the JScript = block to the following.
JScript = ExternalRuntime.new(
name: "JScript",
command: "cscript //E:jscript //Nologo",
runner_path: ExecJS.root + "/support/jscript_runner.js",
encoding: 'UTF-8' # CScript with //U returns UTF-16LE
)
I also tried installing therubyracer which leads to problems with the libv8 dependency not compiling. I added my python 2.7 install to the windows system path, and installed libv8. Then it said libv8 was installed but when I tried to install therubyracer it said libv8 couldn't be found. I uninstalled libv8 and tried again and it said libv8 couldn't be compiled. That was enough for me to determine that therubyracer was not going to work on windows, so I commented it out of my Gemfile, leaving python 2.7 on my windows system path.I updated coffee-script-source, by adding the following to my Gemfile
gem 'coffee-script-source', '1.9.0'
After adding coffee-script-source to my Gemfile I ran gem update coffee-script-source , this also didn't solve the problem.I then installed node.js, this worked for 5 minutes until I generated a new controller, and it was broken again.
Note: After installing node.js you need to open a new command prompt to get the updates to your system path that are setup when node.js installs.
Finally what fixed this problem was to open up the app\assets\javascripts\application.js file and remove the last line which says
//= require_tree .
Lastly run the following command to make sure coffee-script is properly installed in Node.js
npm install -g coffee-script
Rails coffeescript : TypeError: Object doesn't support this property or method
According tho this, CoffeeScript doesn't play well with Windows. You may want to try downgrading the version of CoffeeScript or completely removing it from your Gemfile.
Then just rename the .coffee
file to a plain .js
and rock regular javascript in your Rails app.
ExecJS::ProgramError in Welcome#index TypeError: Object doesn't support this property or method
In your /app/views/layouts/application.html.erb line 5 and 6, change the first parameter application to default.
ExecJs throwing error for rails_admin on Windows
Try this. In your Gemfile, put
gem 'coffee-script-source', '1.8.0'
then runbundle update coffee-script-source
I've read 1.9.0 has issues on Windows, and have used this workaround in the past, but the issue resurfaced in a newer project with Rails Admin today, leading me to your post. Of course it works on Ubuntu and Mac OSX. Here's another post where this worked for someone else. javascript_include_tag throws unsupported method
I recently found another solution for this problem. gem 'coffee-script-source'
in 1.9.0
has some issues with Rails on Windows
. I reverted to the previous version using gem 'coffee-script-source', '1.8.0'
in the Gemfile, this will resolve your problem.
Another way of solving this exception is installing Node.js onto your machine and the error should go away after installing & restarting rails server
. Make sure that you add Node.js into your PATH before restarting the terminal(s) and rerun the server.
Rails ExecJS::ProgramError in Pages#home?
In your /app/views/layouts/application.html.erb
lines 5 and 6, change the first parameter from application
to default
.
I met the same problem, too
for my situation, I don't know why, but it only happens on Windows.
The parameter application
works on the web server.
Related Topics
What Is the Most Efficient Way to Reverse an Array in JavaScript
Node.Js Piping the Same Readable Stream into Multiple (Writable) Targets
Should Github Be Used as a Cdn for JavaScript Libraries
How to Auto-Slide the Window Out from Behind Keyboard When Textinput Has Focus
Bootstrap: Open Another Modal in Modal
How to Stop Events Bubbling in Jquery
How to Insert Variables in JavaScript Strings
React Jsx: Selecting "Selected" on Selected <Select> Option
Initializing Select with Angularjs and Ng-Repeat
How to Read the Correct Time/Duration Values from Google Spreadsheet
Domnodeinserted Equivalent in Ie
Read a Text File Using Node.Js
Handling Key-Press Events (F1-F12) Using JavaScript and Jquery, Cross-Browser
Event.Wheeldelta Returns Undefined
How to Sort an Associative Array by Its Values in JavaScript
Invoke a Callback at the End of a Transition
JavaScript - Telling Setinterval to Only Fire X Amount of Times