Execjs::Programerror in Welcome#Index Typeerror: Object Doesn't Support This Property or Method

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.

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.

Getting error on CSS with Ruby On Rails

Missing semicolon (if you've ever done PHP, it would be one of the first things you'd look for):

#title{
color: #0b1e40;
}

Looking around, the error you have seems to be this:

Object doesn't support this property or method Rails.root

This suggests a problem with your routes:

#config/routes.rb
root "welcome#index" #-> you don't need (get "welcome#index")

--

You may also have an issue with ExecJS (the class which runs javascript on your system) -- if you're using Windows, you should download nodeJS, install and run it, restarting your rails server in the meantime.

This should solve the problem with calling application vs default in your layout.

Plugin working out of rails but not inside rails

I suppose, you didn't plug in this library correctly. I didn't find a gem that integrates this plugin into Rails asset pipeline, so you should put plugin file into vendor/assets/javascripts directory. Just copy shuffletext.jquery.js to this folder.

Then you can either add //= require shuffletext.jquery.js to manifest file (usually it's app/assets/javascripts/application.js) after jQuery, or manually add javascript_include_tag 'shuffletext.jquery' to required pages.

If you decided to require plugin in manifest, you can use it on every page where the manifest is plugged. Usually it is plugged in layout, so all pages that use this layout will have it.

If you decided to use javascript_include_tag, you also should add Rails.application.config.assets.precompile += %w( shuffletext.jquery.js ) to your config/initializers/assets.rb file. In this case you will get your plugin only on those pages where you have specified javascript_include_tag.



Related Topics



Leave a reply



Submit