I'm upgrading to Ember rc5 from rc3, but I'm getting the following error:
Uncaught Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (>= 1.0.0-rc.4) or downgrade your runtime to an older version (== 1.0.0-rc.3)
Here are the relevant lines in my gemfile, taken straight from the ember-rails README (except pulling the gem from git... it gives the same error whether I include that or not)
gem 'ember-rails', git: 'https://github.com/emberjs/ember-rails.git'
gem 'ember-source', '1.0.0.rc5'
gem 'handlebars-source', '1.0.0.rc4'
I'm using rails 3.2
I know this problem has come up before, but none of the solutions I've found have made a difference. Things that haven't worked:
deleting precompiled assets
rake tmp:clear
making sure my javascrcipt load order is jquery, then handlebars, then ember
restarting the server
threatening the compiler
giving up hope and watching Buffy reruns
trying all of those in conjunction, in every imaginable order
Simple and definitive answers are best, of course, but I'd also be glad for hints on what I can study to figure this out on my own. I don't know where to start.
For now, ensure your Gemfile is using the edge version:
gem 'ember-rails', :git => 'git://github.com/emberjs/ember-rails.git'
gem 'ember-source', '1.0.0.rc5'
gem 'handlebars-source', '1.0.0.rc4'
A new version of the gem should be released to resolve the issue soon. This fixed the problem for me.
Related
When ever I am doing gem install knife-github-cookbooks on centos 7, I am getting below error. Please help
ERROR: Error installing knife-github-cookbooks:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
We recommend you use ChefDK on workstations, as it includes all the needed headers and whatnot. Make sure you use chef gem install.
I'm working on making my first very simple rails app, and I think I'm running into trouble because I have both rvm and rbenv installed.
I'm not actually sure if it's related to that, but I thought it might be --
I'm trying to run the command: sudo rake gems:install
and I'm getting this error message:
Could not find rake-11.1.1 in any of the sources
I ran bundle update rake and bundle install, and when I write 'which rake' - I get this: (which is why I thought it might be related to the fact that I have both rvm and rbenv included in my bash_profile)
/.rvm/gems/ruby-2.1.2/bin/rake
If this is the issue --- what will happen if I uninstall rvm? I don't really understand what it does well enough to understand what it will do to my existing code.
Thanks!
rvm is a great toolset for managing multiple ruby versions. I think of it like a tackle box for fishing: You've got different ruby versions, 1.9.3, 2.0.0, 2.2.3, etc. like the layers on the tackle box. rvm keeps a different directory for each version of ruby you have installed.
If you rvm use 2.2.3 you're telling your shell to point to ~/.rvm/rubies/ruby-2.2.3/bin/ruby (check which ruby to be sure).
If you rvm use system and then which ruby you'll see /usr/local/bin/ruby, or the system-installed version
You can put different gems (tackle/bait/tools) in each one. This is immensely useful if you're developing on multiple ruby apps/gems at the same time.
If you rvm implode you'll clean all the .rvm/ruby installs out of your system. This is a good, safe way to keep your system ruby untainted, which is more of a hassle to reinstall.
Go ahead and try reinstalling rvm and bundle-installing.
What is the difference between Calabash-ios and Calabash-cucumber?
calabash-ios and calabash-cucumber both refer to the same gem, so there is no difference.
https://github.com/calabash/calabash-ios
the reason the gem is called calabash-cucumber is historical - in the beginning there was no calabash-android gem.
i believe the plan is change the gem name to calabash-ios in version 1.0.
I am writing an ember app, and not using rails nor grunt for anything. I previously had a short python program that took text files and did some markdown stuff with them, and then compiled them all to a templates.js file using ember-precompile:
ember-precompile templates/*.hbs -f templates/templates.js
This worked great until I upgraded ember, and now I'm getting this error.
Uncaught Template was precompiled with an older version of Handlebars than the current runtime.
Please update your precompiler to a newer version (>= 1.0.0) or downgrade your runtime to an older version (== 1.0.0-rc.3).
I need to upgrade my ember-precompile program, but solutions like changing a grunt config or changing gemfiles are no good for me, since I'm not using either of those tools.
Also, attempts to upgrade or reinstall haven't made any changes at all.
Ember version Version: v1.0.0
Last commit: e2ea0cf (2013-08-31 23:47:39 -0700)
Handlebars version Handlebars.VERSION = "1.0.0";
Feel free to fill in any gaps in my understanding. For short term development purposes I'm just going to put my templates in index.html but I want to do markdown stuff to my templates first, so that won't do forever.
You would need to recompile your handlebar files using the latest ember-precompile version that matches the run time version. Basically, ember-precompile that you are using is older version but you are currently running the newer version of ember. That is what the compliant is about.
Turns out I just needed to learn the magic of github and npm and download a non "release" version of the program and install it. Pretty stupid of me really.
If anyone in the future has this problem, just check out npm install and get one of the fixed versions from github in a zip file or whatever suits you.
Upon cloning my first Rails 3.1.1 app, my first bundle install choked on the eventmachine 0.12.10 gem. (I'm running Windows 7 32 bit)
I'm also using gem 'thin' as well.
I found this post that had the same problem.
Which version of eventmachine is able to work in windows?
Which I integrated with this line in my gemfile:
gem "eventmachine", ">= 1.0.0.beta"
That allowed the bundle install to run but when I start the rails server I get a Ruby popup with the header ruby.exe - System Error and the text
The program can't start because libgcc_s_sjlj-1.dll is missing from your computer. Try reinstalling the program to fix this problem.
After I click OK I get this message in the console
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
followed by a long stack trace (request to see if you think this will help).
I see that EventMachine gem requires a C++ compiler. I reinstalled MinGW on my 32 bit Windows 7 machine and I added MinGW\bin to my PATH variable.
But when I look into that bin folder, the file libgcc_s_sjlj-1.dll isn't there and the same error message persists. I found this thread about the lack of that folder from 2009 but I'm not really sure what to do about it.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539033
Thanks for any help you can give me.
I solved this problem by adding
require "em/pure_ruby"
in the config/application.rb
Hope this could help.
Add this to your gem file
gem 'eventmachine', '1.0.0.beta.4.1'
Also note that if you switch back to a unix based OS, you will have to use 1.0.0.beta.4.
This is probably because eventmachine is dynamically linked to the mingw dlls.
You can:
require 'devkit'
on the top of your script. This will temporarily enhance your path with the path to the mingw devkit.
Source