I’m completely new to emberjs. When I started reading about models in guides I realized that I need to compile ember-data by myself. Okay, went to ember.js - Compiling ember-data - Stack Overflow, tried:
git clone git://github.com/emberjs/data.git - OK
cd data - OK
bundle install - there I got an error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require’
from extconf.rb:1:in `’
Gem files will remain installed in /var/lib/gems/1.9.1/gems/posix-spawn-0.3.6 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/posix-spawn-0.3.6/ext/gem_make.out
An error occurred while installing posix-spawn (0.3.6), and Bundler cannot continue.
Make sure that gem install posix-spawn -v '0.3.6' succeeds before bundling.
Then I tried: `gem install posix-spawn -v ‘0.3.6’ and got this:
Building native extensions. This could take a while…
ERROR: Error installing posix-spawn:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require’
from extconf.rb:1:in `’
Gem files will remain installed in /var/lib/gems/1.9.1/gems/posix-spawn-0.3.6 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/posix-spawn-0.3.6/ext/gem_make.out
I’ve never worked with ruby. Seems a little bit complicated, what should I do to get the last ember-data.js?
It looks like you’re not using rvm. Unless you have some particular reason for avoiding it, I would recommend switching to rvm: it will likely save you the headache of trying to figure out why your environment seems to be pointing to the wrong ruby.
I ran into a similar problem (in my case, I didn’t have bundle), but I would like to ask a slightly higher-level question:
Why do we all need to compile ember-data in the first place?
It would make it way easier for me, as a new (potential?) Ember user, to be able to just download ember-data.js from somewhere. I totally understand ember-data is under development, and to that end, I would be more than happy to git clone a repo, and either copy or create a symlink to a file within it, but making me install ruby, bundle, various gems, etc… just to link to a javascript file seems a little heavy weight.
Okay, I’ll try to compile it at my work once again paying special attention to ruby version.
But now I tried to use bwinton’s link, and it seems it’s not going to be easy This is my head section:
I commented application.js so as I’m sure I don’t have any mistakes in my app. And I get: Uncaught TypeError: Object [object Object] has no method ‘readOnly’, line 3535