I have a rails app that I uploaded to a server that uses Passenger. The error that is produced is:
compile error PATH TO GEM FILE/Gemfile:28: syntax error, unexpected ':', expecting kEND ...ery-datatables-rails', github: 'rweng/jquery-datatables-rail... ^
In the gem file, I have this:
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
which is the line it is failing on.
What am I missing?
Are you using Ruby 1.8 on your server? That's an error I see often when people try to use Ruby 1.9 hash syntax (eg foo: 'bar' instead of :foo => 'bar') when Ruby 1.8 is installed.
Ruby version matters. On the server, I have 1.8.7 and the syntax should be:
gem 'jquery-datatables-rails', :git => 'git://github.com/rweng/jquery-datatables-rails.git'
Related
When I make a new Rails project, add gem 'reactive-record', and run rails server, I get a Bundler error: There was an error while trying to load the gem 'reactive-record'. (Bundler::GemRequireError).
What gives? I have Rails 4.2.5 and Ruby 2.1.2.
Cheers!
The latest version of the generator should work very well with the help of Mitch. We collaborated together to make a generator in order to simplify greatly the installation of react.rb and reactive-record.
You should be able to get up and running by adding to your gem file :
gem 'reactive_rails_generator'
Then do a bundle install
and finally :
rails g reactrb:install --all
bundle update
Will install you reactrb, reactive-record and reactive-router.
Once installed, you can create components by doing :
rails g reactrb:component Home::Show
I worked around the problem like this:
Set rvm to use Ruby 2.2.2 and Rails 4.2.4.
Download https://codeload.github.com/catprintlabs/reactive-record/zip/master
Edited reactive-record-master/Gemfile to read:
gem 'reactive-ruby'
gem 'opal'
gem 'opal-browser'
gem 'react-rails'
cd reactive-record-master/spec/test_app
bundle install
rails server
This seemed to work.
Then, I made a new Rails 4.2.4 project. Adding only gem 'reactive-record' to the Gemfile resulted in the same error. Then I made the Gemfile read:
gem 'reactive-ruby'
gem 'opal'
gem 'opal-browser'
gem 'react-rails'
gem 'reactive-record'
And voila, rails server works!
Hope this helps someone else.
I am trying to use this fork of a gem:
https://github.com/hoyaemt/capistrano-syntax-checking
In my gemfile I have:
gem "capistrano-syntax-checking", :git => "git://github.com/hoyaemt/capistrano-syntax-checking.git"
When I run bundle install, I get:
Could not find gem 'capistrano-syntax-checking (>= 0) ruby' in git://github.com/hoyaemt/capistrano-syntax-checking.git (at master).
Source does not contain any versions of 'capistrano-syntax-checking (>= 0) ruby'
I have read a bunch of postings but nothing I try seems to work here. Any ideas?
thanks
Joel
The original version is missing the gemspec file. It may be missing other things but I was able to get the bundler to run.
Add a gemspec file to the root of your fork. See here for a simple example and just create capistrano-syntax-checking.gemspec file.
I am trying to get started with ruby on rails and whenever I try to start the server using rails server command I get the sqlite3 not found error. I tried the following:
which sqlite3
And I got the following:
/opt/local/bin/sqlite3
I am thinking that should it not be
/usr/local/bin/sqlite3
Why is it installed incorrectly on my machine? How can I fix it?
Check the output of gem list. If the sqlite gem is not in there then you need to install it.
For Rails 3 you need to add the following in your Gemfile:
gem 'sqlite'
... then run:
bundle install
For Rails 2 run:
gem install sqlite
I installed the gem SystemTimer 1.2.3 but still getting this error message. Any ideas?
I added the following to my Gemfile and the error went away.
gem 'SystemTimer', '1.2.3'
I'm trying to setup my ruby on rails dev environment on my macbook pro but running into this error:
/usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:289:in load': uninitialized constant
Psych::Syck (NameError) from
/usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:289:in_load'
I tried using another yaml engine by specifying syck in config/boot.rb but that didn't work.
require 'yaml'
YAML::ENGINE.yamler= 'syck'
I'm using
Rails 3/Ruby 1.9.2-p180/Bundler 1.0.10/RubyGems 1.6.2. I installed ruby 1.9.2 via brew.
Update rubygems worked for me.
gem update --system
If you have this :
gem "rspec-rails", ">= 2.0.0.beta.20"
remove ', ">= 2.0.0.beta.20"'
gem "rspec-rails"
It works for me
GemCutter rake build now throws "undefined method 'write' for #<Syck::Emitter:...." after updating to rubygems 1.5.0 on ruby 1.9.2 on Windows maybe related?