Why won't this gemfile update or install with bundler? - ruby-on-rails

This is my gemfile - I'm working on Michael Hartl's RoR tutorials. I keep getting "Gemfile syntax error:" when I try to bundle install or bundle update. Insight?
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.4'
group :development, :test do
gem 'sqlite3', '1.3.8'
gem 'rspec-rails', '2.13.1'
gem 'guard-rspec', '2.5.0'
gem 'spork-rails', '4.0.0'
gem 'guard-spork', '1.5.0'
gem 'childprocess', '0.3.6'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
gem 'growl', '2.1.0'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end

Try adding do to the line group :production:
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end

Related

Ruby version 2.2.5 but your Gem file specified 2.1.2

I already tried to update gem bundle and also try to pick gem 2.1.2 but ruby is not supporting them. Here is the error message:
error message
Gemfile:
source 'https://rubygems.org'
ruby '2.1.2'
gem 'rails', '4.2.4'
gem 'pry-rails'
gem 'pg'
gem 'bcrypt', require: 'bcrypt'
gem 'friendly_id'
gem 'sass-rails', '~> 5.0'
gem 'bootstrap-sass'
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'puma'
gem 'rails_12factor', group: :production
gem 'newrelic_rpm'
gem 'rack-timeout'
gem 'rmagick'
gem 'aws-sdk'
gem 'paperclip'
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'binding_of_caller'
gem 'better_errors'
gem 'annotate'
gem 'dotenv-rails'
gem 'spring'
end
It seems that you have defined the ruby version for your project in the Gemfile. If you comment it out then, your app could use the system version of Ruby. If you need further help please publish the code in Gemfile.

Rake generate_session_store error with Gemfile

I am trying to make a site live through hostgator, and I am following their instructions
When I get to step 5.6, where I enter rake generate_session_store in SSH I get the error
There was an error in your Gemfile, and Bundler cannot continue.
I can not figure out what I am doing wrong. If anyone can help me it would be greatly appreciated.
My current gemfile:
source 'https://rubygems.org'
gem "rake", "0.8.7"
gem "rack", "1.1.0"
gem "i18n", "0.4.2"
gem "rubytree", "0.5.2", :require => "tree"
gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay
gem "mysql"
gem "coderay", "~>0.9.7"
gem "rdoc", "~>2.4.2"
gem 'rails', '4.2.0'
gem 'bcrypt', '3.1.7'
gem 'bootstrap-sass', '3.2.0.0'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
#gem 'acts_as_shopping_cart', '~> 0.2.1'
gem 'selenium-webdriver', '~> 2.46.2'
gem 'activerecord', '~> 4.2.0'
gemspec
gem 'activemerchant'
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
gem 'cucumber-rails', :require => false
# database_cleaner is not required, but highly recommended
#gem 'database_cleaner'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
gem 'puma', '2.11.1'
end

single, short Rspec test takes 80 seconds? [duplicate]

I have this very simple and short test which takes a 80 seconds to run, any advice on speed it up?
require 'spec_helper'
describe "Battles" do
let(:character) { (FactoryGirl.create :character) }
describe "Battle button" do
it "redirects to battle screen" do
character.init("fighter")
click("Battle")
expect(page).to have_content character.name
end
end
end
Gemfile
source 'https://rubygems.org'
ruby '2.0.0'
gem 'pg', '0.15.1'
gem 'rails', '4.0.2'
gem 'bcrypt-ruby', '~> 3.1.2'
gem 'twitter-bootstrap-rails'
gem 'therubyracer'
gem 'devise'
gem 'less-rails'
gem 'will_paginate', '~> 3.0'
gem 'heroku'
group :development, :test do
gem 'rspec-rails', '2.13.1'
gem 'better_errors'
gem 'binding_of_caller'
gem 'factory_girl'
gem 'guard-rspec'
gem 'guard-spork'
gem 'capybara', '2.1.0'
gem 'factory_girl_rails', :require => false
gem 'spork-rails'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
end
group :production do
gem 'rails_12factor', group: :production
end
#gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
You can try to use Zeus to speed things up.
Do you have a lot of tests and this one is the only slow one or do only have this test?
How does the rest of your configuration look?

There was an error in your Gemfile after running rails server

I tried running rails s and it gave me an error: There was an error in your Gemfile, and Bundler cannot continue.
Here's the Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'bootstrap-sass'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
gem 'annotate'
gem 'pg'
gem 'faker'
gem 'omniauth-facebook'
gem 'fb_graph'
gem 'jquery-rails'
gem 'haml'
gem 'haml-rails', '= 0.3.4'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'thin'
gem 'google-analytics-rails'
gem 'nokogiri'
gem 'differ'
gem 'geocoder'
gem 'newrelic_rpm'
group :development do
gem "rails-erd"
gem 'rspec'
gem 'quiet_assets'
end
group :test, :development do
gem 'mail_safe', '0.3.1'
gem "rspec-rails", "~> 2.0"
gem 'shoulda-matchers'
gem "factory_girl_rails", "~> 3.0"
gem 'pry'
gem 'pry-rails'
gem 'pry-remote'
gem 'pry-nav'
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
group :development, :production do
gem 'gmaps4rails'
end

A file called -e in my Rails app root directory

Right in my root path (where the Gemfile is) I have a file called -e which is empty. I wonder if this is something created by Rails or plugin? Or just a file I created by accident?
Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.8'
gem 'bootstrap-sass', '2.0.4'
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.11.0'
end
gem 'annotate', '2.5.0', group: :development
# 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 :test do
gem 'capybara', '1.1.2'
gem 'factory_girl_rails', '4.1.0'
end
group :production do
gem 'pg', '0.12.2'
end
(I hope is not the later, or I will feel very stupid).

Resources