Upgrading from Rails 3.1 to 3.2 error - ruby-on-rails

I'm upgrading a Rails app from 3.1 to 3.2
It uses gem 'twitter-bootstrap-rails' with gem 'less'.
I'm getting an error trying to launch the thin server.
Now I'm getting this error. It says "no such file" even though I have that file in my app:
LoadError in Home#index
Showing /Users/burtondav/sites/requestsys/app/views/layouts/application.html.erb where line #20 raised:
no such file to load -- less
(in /Users/burtondav/sites/requestsys/app/assets/stylesheets/bootstrap_and_overrides.css.less)
Extracted source (around line #20):
17: }
18: </style>
19:
20: <%= stylesheet_link_tag "application", :media => "all" %>
21:
22: <!-- Le fav and touch icons -->
23: <link href="/favicon.ico" rel="shortcut icon">
Is there something wrong with the less gem?
Thanks!!
UPDATE
I re-installed gem 'twitter-bootstrap-rails'. Now I'm getting this error:
Cannot call method 'charAt' of undefined
(in /Users/burtondav/sites/requestsys/app/assets/stylesheets/bootstrap_and_overrides.css.less)
I found this answer about less.js ->
https://github.com/cloudhead/less.js/issues/906
But, I'm using gem 'less-rails'
Could this be a know problem that is fixed in less.js and not the less-rails gem?
UPDATE 2
I found this
"in sprite.less i changed background-image: url("#{iconSpritePath}"); and background-image: url("#{iconWhiteSpritePath}");
adding the " " and the { } got rid of the errors.."
But, that's not rails.
My paths are:
// Set the correct sprite paths
#iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings.png");
#iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white.png");
UPDATE 3
I found another answer - upgrade to Ruby 1.9.3 . I'm using ruby 1.9.2p290
But, I'm nervous doing that. Should I be nervous? Would my app still run on Heroku?
I'm going to open a new question - the title for this one is now incorrect.

I vaguely remember having a problem like this. Maybe try less-rails instead of less. I have the following:
gem 'twitter-bootstrap-rails'
gem 'less-rails'
Also make sure you have (or some other javascript interpreter).
gem 'therubyracer', '0.10.2', :platforms => :ruby
uncommented in your Gemfile. It almost looks like you're not able to compile your assets which

Related

Hello World in Ruby On Rails Getting Started Tutorial not working [duplicate]

UPDATE: Colin's suggestion of removing the line //= require_tree . has fixed the issue.
I have wasted over 2 days trying to follow every suggestion out there and fix my issue. I am trying to follow the http://ruby.railstutorial.org book on windows machine and cannot for the life of me get past the following nasty error.
ExecJS::RuntimeError in Static_pages#home
Showing C:/Users/.../bootcamp-sample-app/app/views/layouts/application.html.erb where line #6 raised:
["ok","(function() {\n\n\n\n}).call(this);\n"]
(in C:/Users/.../bootcamp-sample-app/app/assets/javascripts/sessions.js.coffee)
Extracted source (around line #6):
3: <head>
4: <title><%= full_title(yield(:title)) %></title>
5: <%= stylesheet_link_tag "application", media: "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: <%= render 'layouts/shim' %>
9: </head>
Rails.root: C:/Users/.../bootcamp-sample-app
Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___487732698_30422172'
Request
I have tried every suggestion including installing nodejs with the msi, using execjs 1.3.0 and other things which I can't even remember any more. Here is the gem file
source 'https://rubygems.org'
gem 'rails', '3.2.8'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.10.0'
gem 'guard-rspec', '0.5.5'
gem 'guard-cucumber'
end
group :development do
gem 'annotate', '2.5.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'coffee-script'
gem 'uglifier'
end
gem 'jquery-rails', '2.0.2'
gem 'execjs'
# Gems on Linus/Mac
#gem 'therubyracer'
group :test do
gem 'capybara', '1.1.2'
gem 'guard-spork', '0.3.2'
gem 'spork', '0.9.0'
gem 'factory_girl_rails', '1.4.0'
gem 'cucumber-rails', '1.2.1', require: false
gem 'database_cleaner', '0.7.0'
# Test gems on Linux
# gem 'rb-inotify', '0.8.8'
# gem 'libnotify', '0.5.9'
# Test gems on Macintosh OS X
# gem 'selenium-webdriver', '~> 2.22.0'
# gem 'rb-fsevent', '0.9.1', :require => false
# gem 'growl', '1.0.3'
# Test gems on Windows
# gem 'rb-fchange', '0.0.5'
# gem 'rb-notifu', '0.0.4'
# gem 'win32console', '1.3.0'
end
group :production do
# gem 'therubyracer'
gem 'pg', '0.12.2'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
#gem 'debugger''
and here is the sessions.js.coffee
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
//= require bootstrap
application.html.erb
<!DOCTYPE html>
<html>
<head>
<title><%= full_title(yield(:title)) %></title>
<%= stylesheet_link_tag "application", media: "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<%= render 'layouts/shim' %>
</head>
<body>
<%= render 'layouts/header' %>
<div class="container">
<%= yield %>
<%= render 'layouts/footer' %>
</div>
</body>
</html>
Here is console content
Processing by StaticPagesController#home as HTML
Rendered static_pages/home.html.erb within layouts/application (45.0ms)
Completed 500 Internal Server Error in 1136ms
ActionView::Template::Error (["ok","(function() {\n\n\n\n}).call(this);\n"]
(in C:/Users/.../bootcamp-sample-app/app/assets/javascripts/sessions.js.coffee)):
3: <head>
4: <title><%= full_title(yield(:title)) %></title>
5: <%= stylesheet_link_tag "application", media: "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: <%= render 'layouts/shim' %>
9: </head>
app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___487732698_30422172'
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.0ms)
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.0ms)
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (34.0ms)
I have installed Devkit and have tried various gems but please suggest changes which can help me develop on windows. I used rubyinstaller for everything.
What am I missing?
My friend was attempting a Rails tutorial on Win 8 RTM a few months ago and ran into this error. Not sure if this issue exists in Windows 7 as well, but this may help.
Options:
1) Removing //= require_tree . / Ignoring the issue - As ColinR stated above, this line should not be causing an issue in the first place. There is an actual problem with ExecJS working properly with the JavaScript runtime on your system and removing this line is just ignoring that fact.
2) Installing Node.js / Running away - Many people seem to just end up installing Node.js and using that instead of the JavaScript runtime already on their system. While that is a valid option, it also requires additional software and only avoids the original issue, which is that ExecJS is not working properly with the JavaScript runtime already on your system. If the existing JavaScript runtime on your system is supposed to work, why not make it work instead of installing more software? According to the ExecJS creator, the runtime already built into Windows is in fact supported...
ExecJS lets you run JavaScript code from Ruby. It automatically picks the best runtime available to evaluate your JavaScript program, then returns the result to you as a Ruby object.
ExecJS supports these runtimes:
therubyracer - Google V8 embedded within Ruby
therubyrhino - Mozilla Rhino embedded within JRuby
Node.js
Apple JavaScriptCore - Included with Mac OS X
Microsoft Windows Script Host (JScript)
(from github.com/sstephenson/execjs#execjs )
3) Actually fixing the issue / Learning - Use the knowledge of options 1 and 2 to search for other solutions. I can't tell you how many webpages I closed upon seeing options 1 or 2 was the accepted solution before actually finding information about the root issue we were having. The only reason we kept looking was that we couldn't believe the Rails team would (1) insert a line of code in every scaffold generated project that caused an issue, or (2) require that we install additional software just to run that default line of code. And so we eventually arrived at a fix for our root issue (your miles may vary).
The Fix that worked for us:
On the system having issues, find ExecJS's runtimes.rb file. It looks like this. Make a copy of the found file for backup. Open the original runtimes.rb for editing. Find the section that starts with the line JScript = ExternalRuntime.new(. In that section, on the line containing :command => "cscript //E:jscript //Nologo //U", - remove the //U only. Then on the line containing :encoding => 'UTF-16LE' # CScript with //U returns UTF-16LE - change UTF-16LE to UTF-8 . Save the changes to the file. This section of the file should now read:
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
)
Next, stop then restart your Rails server and refresh the page in your browser that produced the original error. Hopefully the page loads without error now. Here's the ExecJS issue thread where we originally posted our results: https://github.com/sstephenson/execjs/issues/81#issuecomment-9892952
If this did not fix the issue, you can always overwrite the modified runtimes.rb with the backup copy you (hopefully) made and everything will be back to square one. In that case, consider option 3 and keep searching. Let us know what eventually works for you.. unless it's removing the require_tree or installing node.js, there's plenty of that going around already. :)
Had the same issue
OS- Windows 8
Error- 'ExecJS::RuntimeError...'
Solution- missing Node.js
install Node.js from http://www.nodejs.org/download/
Restart the computer
I had this problem and was scowering the internet I am running Windows 8 with this rails gem file
source 'https://rubygems.org'
gem 'rails', '3.2.9'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development do gem 'sqlite3', '1.3.5'
end
# Gems used only for assets and not required # in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.2'
group :production do
gem 'pg', '0.12.2'
end
Went to http://nodejs.org/download/ installed - restarted the machine and everything worked.
I favoured the Learning route. It seems the problem stems from
IO.popen(command, options) { |f| output = f.read }
returning an empty string in execjs\external_runtine.rb (line 173 in version 1.4.0). This is why the error message contains no text. The changes suggested did not work for me. I changed UTF-16LE to UTF-8, but it still returned an empty string. I removed \\U from the command - this at least returned text, but it was in the wrong encoding - in the browser it displayed as Chinese characters.
According to this MSDN blog post, using the //U flag and redirecting to a file causes cscript to return the result using UTF-16.
And then, magically, it worked (##%$&^#$%!!!?!?!) using command as "cscript //E:jscript //Nologo" and encoding as "UTF-8". Oh well.
I had to add my nodejs folder to my Windows Path environment variable. In Windows 8 open the Control Panel, go to System, Advanced system settings (on the left), click Environment Variables on the left, and edit the Path variable to include the directory to your nodejs folder (probably in Program Files).
Of course you have to have Node.js installed (use the Windows installer) and have installed CoffeeScript through NPM.
I know this is a very late answer for this issue, but I got on something similar and went down the full path to understand what was really causing the issue.
Turned out that the default windows jscript engine is still on es3, and many gems are taking advantage of es5 or es6 features.
Unfortunately if this happen (you are using a gem or a piece of code that leverage es5 or es6 features), there is no way to let it work on windows with the native js engine.
This is the reason why installing node.js solves the problem (node is at least es5).
Hope this can help some folks struggling with a runtime error of jsexec.
My 2 cents advise is to install node(very easy) or install v8, and not removing the //=require_tree.
Note execjs will automatically use node if detected. Otherwise force its use, adding in boot something like:
ENV['EXECJS_RUNTIME'] = 'Node'
To set the env to node.
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
I tried all the above options, and also mixed up a few combinations of them, till I found this Rails-4, ExecJS::ProgramError in Pages#welcome 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
coffee-script-source-1.8.0.gem Removing outdated .gem files from vendor/cache
coffee-script-source-1.9.1.1.gem Bundle updated!
For beginners like me:
Navigate to \app\views\layouts\application.html.erb
Change line 6 from:
'<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>'
to
<%= javascript_include_tag 'defaults', 'data-turbolinks-track' => true %>
Source from tutorial to fix here
Quick and dirty solution: remove //= require_tree . from application.js.
As I explain in the comments for the question, this doesn't actually solve the underlying issue that is causing the error, but merely sidesteps it.
I used the solution number 2 because previously i had have this mistake, but in this ocation didn't work, then I added the
gem 'coffee-script-source', '1.8.0'
and run
bundle install
and my problem was fixed
Here's a less complicated solution, for beginners:
If you are just working through the tutorial, you are probably working with the default Gemfile (or very nearly). You can open it up in your text editor, and remove the pound sign from the front of this line:
# gem 'therubyracer', :platforms => :ruby
You will need to re-run bundle install, which will likely download a few things. But once it does, you should be able to start the server without any problem.
At least, that worked for me.
This also works on Ubuntu 12.04, by the way.
Running Win 8 64 bit
rails 4.2.5
ruby 2.1.7
This one worked for me
Did you change the location of your code from C:\Users\this-user\yo-app?
When I was young in rails I have created an app and the default location of my app was C:\Users\Duncan\my-app and then, when I changed my-app and placed it in D:\All-my-Apps-folder i had that error....
I scratched my head, tried 1,2,3 and more .....nothing! Until I returned all code to default folder location and to my amazement, I was rolling again :)
In case someone may find this useful (I can't explain why that happened, maybe someone may without speculation)

NoMethodError in Pages#home undefined method `environment' for nil:NilClass

My relatively basic app was working fine then all of a sudden I ran into the following error. I have tried to solve this on my own with no luck. I thank any of you in advance for hoping me to solve this issue.
NoMethodError in Pages#home undefined method `environment' for nil:NilClass (in /Users/kevindark/Site Name/app/assets/stylesheets/application.css.scss)
The exception page indicated the problem was extracted from the stylesheet_link_tag line of code below.
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title><%= #title || "Site Name" %></title>
<%= favicon_link_tag 'favicon.ico' %>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
Adding application.css.scss
/*
* Overwritten by RailsBricks
*
*= require_self
*/
#import "framework_and_overrides";
framework_and_overrides.css.scss available at the link below.
https://gist.github.com/kdark11/9537485
This happened to my Rails app today as well.
It was driving me crazy and your question was the only hit on Google for the problem.
It turns out it was caused by the seemingly-harmless running of "bundle update" (just after adding a gem) which upgraded the 'sprockets' gem to '2.12.0'.
I forced sprockets to use the previous version with:
gem 'sprockets', '2.11.0'
in the Gemfile, then ran
bundle update
...and this solved it for me. edit: restart the server to finish, as the user below stated (thanks). Wow, if I had a dollar for every server restart during development! :-D
Major changes to resources and configuration always require a server restart.
2.12.0 was only released today, so I guess it has a bug or an incompatibility with some other gems we are using. I don't know for sure, I'm a bit of a n00b myself.
I hope this helps!
Edit: For the record, I can verify that faker and sass are not involved as they were installed/upgraded around the same time as the breaking update and I eliminated each. I can't speak for other gems but sprockets definitely is part of the problem here.
Downgrading to:
gem 'sprockets', '2.11.0'
...didn't work for me.
It turned out that I needed to lock slim as well:
gem 'sprockets', '2.11.0'
gem 'slim', '2.0.0'
I ran into this problem while trying to get my app to work. After much trial and error the solution was indeed to update the sprockets gem with:
gem 'sprockets', '2.11.0'
and running
bundle update
Do not forget to restart your rails server, because at first I did not think the solution worked. All that I needed was to restart the server however.
FWIW, I upgraded sprockets to 2.12.3 and I don't get the error anymore. I'm using Rails 4.1.8.
I had this error using Rails 4.2.0 after upgrading from sprockets 2.12.3 to 3.0.1. I needed to actually add the sprockets gem in my Gemfile, and lock the version at 2.12.3.
In my Gemfile:
gem 'sprockets', '2.12.3'
This cleared everything up for me.

Couldn't find file 'jquery', Sprockets::FileNotFound in StaticPages#home error

I am self-studying Michael Hart's guide and am stuck in chapter 7.
When I go to localhost:3000, an error message comes up, saying it couldn't find file jquery and points to line 7 in application.html.erb file.
when I delete the line 7, -> <%= javascript_include_tag "application", "data-turbolinks-track" => true %>, localhost runs normal without an error.
My git repository.
I solved this by reverting to
gem 'jquery-rails', '2.1.4'
gem 'jquery-ui-rails', '4.2.1'
I asume you did'nt run 'bundle install' because:
In application.js you require jquery which should usually come with the the gem 'jquery-rails', '2.2.1'
I removed Gemfile.lock and ran bundle install once again, and it solved the problem.
I solved this by... restarting server! It recollected the libraries and worked like charm.

Rails Cannot call method 'charAt' of undefined

I have a Rails app getting the following error:
Less::ParseError in Home#index
Showing /Users/burtondav/sites/requestsys/app/views/layouts/application.html.erb where line #20 raised:
Cannot call method 'charAt' of undefined
(in /Users/burtondav/sites/requestsys/app/assets/stylesheets/bootstrap_and_overrides.css.less)
Extracted source (around line #20):
17: }
18: </style>
19:
20: <%= stylesheet_link_tag "application", :media => "all" %>
Some GEMS I'm using:
gem 'rails', '3.2.11'
gem 'twitter-bootstrap-rails'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'less-rails'
gem 'commonjs'
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
It seems to be a problem with LESS that Bootstrap uses.
I've read several other similar issues. So, I upgraded Ruby to 1.9.3p374. But, that didn't fix the problem.
Any ideas?
THANKS!
UPDATE
This is the bootstrap_and_overrides.css.less
#import "twitter/bootstrap/bootstrap";
#import "twitter/bootstrap/responsive";
// Set the correct sprite paths
#iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings");
#iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white");
I have temporary fixed the issue. There is a syntax change to the mixins.less that seems to only be supported by LESS.js
As an example:
Post-2.3 release:
.offsetX (#index) when (#index > 0) {
.offset#{index} { .offset(#index); }
.offset#{index}:first-child { .offsetFirstChild(#index); }
.offsetX(#index - 1);
}
Pre-2.3 release
.offsetX (#index) when (#index > 0) {
(~'.offset#{index}') { .offset(#index); }
(~'.offset#{index}:first-child') { .offsetFirstChild(#index); }
.offsetX(#index - 1);
}
After adding (~"") back in everywhere it was removed (you will have to view a diff from 2.3 and the release before to see where its been removed, all my assets compile again with no errors and still using LESS.
This change was only in mixins.less btw and only about a total of 5 or 6 lines.
Got the same failure. Fixed it by rolling back twitter-bootstrap-rails to version 2.1.4 (as of this writing the latest is 2.2.4)
# Gemfile
...
group :assets do
...
gem "therubyracer"
gem "less-rails"
end
gem "twitter-bootstrap-rails", '2.1.4'
After following up with you in the comments. It seems the answer lies in opening a github issue with either twitter-bootstrap-rails or less-rails describing your issue. You could also follow on the original issue: https://github.com/seyhunak/twitter-bootstrap-rails/issues/72
Otherwise two solutions are offered to you:
Use the SASS version: https://github.com/jlong/sass-twitter-bootstrap
Use the native css version available on their site: http://twitter.github.com/bootstrap/customize.html
I solved this in sort of a roundabout way, so YMMV. In my case this error was caused by updating twitter-bootstrap-rails from 2.1.6 to 2.2.5, without any edits to any files. So trying to reproduce this in development, I noticed 404s for requests to halfling icons:
ActionController::RoutingError (No route matches [GET] "/assets/twitter/bootstrap/glyphicons-halflings"):
Since I'm using font-awesome, I simply removed all references to those sprites from my CSS:
# bootstrap_and_override.less
//#iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings");
//#iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white");
// Glyphicons
//#import "twitter/bootstrap/sprites.less";
That in turn led to this error:
variable #fontAwesomeEotPath_iefix is undefined
which is is a common upgrading issue and solved here by adding this line:
#fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix");
After that, everything is working again.

Ruby on Rails error "cannot load such file -- less"

I am fairly new to ruby on rails, I have been trying to use twitter-bootstrap as an asset, so I have included it in my Gemfile, bundled and it installs successfully. However I have noticed that it relies on certain dependencies that are not shown when I do the "bundle" command.
The dependences it needs
(1) Libv8
(2) Less
(3) Less-rails
Error message:
cannot load such file -- less
(in c:/Sites/todo/app/assets/stylesheets/bootstrap_and_overrides.css.less)
[code]
Extracted source (around line #8):
5: <!--[if lt IE 9]>
6: <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
7: <![endif]-->
8: <%= stylesheet_link_tag "application", :media => "all" %>
9: <%= javascript_include_tag "application" %>
10: <%= csrf_meta_tags %>
11: <meta name="viewport" content="width=device-width, initial-scale=1.0">
[/code]
Trace
app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb__560528188_27183396'
app/controllers/lists_controller.rb:7:in `index'
I have noticed a lot of answers to this very question already, and have chosen the obvious solutions, but somehow I still get stuck, and would really appreciate some guidance.
I guess you are using sass instead of LESS.
Have you tried the twitter-bootstrap-rails gem?
gem "therubyracer"
gem "less-rails"
gem "twitter-bootstrap-rails"
https://github.com/seyhunak/twitter-bootstrap-rails
I simply needed to restart my server.
I had added the three gems listed above (less-rails, therubyracer, and twitter-bootstrap-rails, with Rails 3.2.13) while my local server was running, resulting in the problem seen above. So once I shut it down and restarted it again, everything loaded well.
You have to either update therubyracer or downgrade the twitter-bootstrap-rails gem down to version 2.1.7 which is the last known version that didn't have this issue.
Run either bundle update to update your gems or in your Gemfile make your twitter-bootstrap-rails gem look like this:
gem 'twitter-bootstrap-rails', '2.1.7'
Take a look at this issue:
https://github.com/seyhunak/twitter-bootstrap-rails/issues/465
This issue started happening on versions after 2.1.7 on twitter-bootstrap-rails.
If you are getting it under Windows this should help you
therubyracer_for_windows
It helped me
perhaps you are on windows ... there is no libv8 for windows and no binary therubyracer because it depends on libv8

Resources