Could not find bootstrap-sass-2.2.2.0 - ruby-on-rails

I'm trying to get Rails up and running. I'm able to run bundle install successfully, but when I attempt to start the server using rails s I get the following message:
Could not find bootstrap-sass-2.2.2.0
Run `bundle install` to install missing gems.
Here's my Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.9'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'rails_admin'
gem 'devise'
gem 'cancan'
gem 'simple_form'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
# The following three gems are used for Bootstrap
# See: https://github.com/seyhunak/twitter-bootstrap-rails
#NOTE: For therubyracer, run "gem install libv8" and "gem install therubyracer -v '0.11.0'"
end
gem 'therubyracer', '0.11.0beta8'
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem "less-rails"
gem 'bootstrap-sass', '~> 2.2.2.0'
gem 'jquery-rails'

I made a mistake by adding a gem into the gem file with a capital letter before running bundle install. Look over that you dont have any capital letters with the gems you are adding.
Should look like this:
gem 'bootstrap-sass'
Should not look like this:
gem 'Bootstrap-sass'

Related

An error occurred while installing mysql2 (0.3.11)

I am a rails beginner,and I get a demo from https://github.com/rubytaiwan/jobs.ruby.tw
but when I try to run this demo,I got an error.
I run follow
bundle
I got the error
An error occurred while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.
but I can sure I have install mysql2
and the Gemfile is
source 'https://rubygems.org'
ruby "1.9.3"
gem 'rails', '~> 3.2.12'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'devise', '~>2.1.3'
gem 'mysql2'
gem "babosa"
gem "rails_autolink"
gem "settingslogic"
gem "seo_helper"
gem 'open_graph_helper'
gem 'google_plus_helper'
gem 'exception_notification'
gem "mobile-fu"
gem 'capistrano', :group => "development"
gem 'rake', :group => :test
group :development do
gem "capistrano"
gem "magic_encoding"
gem "annotate"
end
group :test, :development do
gem "rspec"
gem "rspec-rails"
gem "simplecov"
gem "capybara"
end
then I try to comment this row:
gem 'mysql2'
but I still got the error.
so I do not know why this error occurs
try it
sudo apt-get install mysql-client libmysqlclient-dev
#Ricardo Masao Shigeoka for the mac ,try first
brew install mysql, then
Put in your Gemfile gem 'mysql2', '0.3.18'
run bundle command in terminal.
This setup worked for me, I have El Captain OS, rails 4.2.6, hope this helps
Try this one
gem 'mysql2', '~> 0.4.10'

"Gemfile syntax error" after editing Gemfile, running bundle install or bundle update

I am a Rails newbie and trying to follow http://railstutorial.org guide.
I am using:
gem 2.0.3
bundler 1.3.5
rails 3.2.13
ruby 2.0.0-p195
When I perform bundle update or bundle install after editing the Gemfile, I get the following errors:
roberts-imac-6:first_app bobbaird001$ bundle update
**Gemfile syntax error:**
roberts-imac-6:first_app bobbaird001$ bundle install
**Gemfile syntax error:**
Here is the Gemfile (I have removed the rows that are commented out)
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'sqlite3', '1.3.5'
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.2.3'cdacd
end
gem 'jquery-rails', '2.0.2'
end
remove the end below sqlite and jquery-rails, remove cdacd at the end of uglifier, and correct the indentation like this:
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'sqlite3', '1.3.5'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.2.3'
end
gem 'jquery-rails', '2.0.2'
only the gems inside the do blocks need indentation.
hope this helps clarify things.
you have syntax error
replace this
gem 'uglifier', '>= 1.2.3'cdacd
to this
gem 'uglifier', '>= 1.2.3'
In addition to the extra characters mentioned by #Ruba Ruba, based on the Gemfile in your question you have a few extra end statements - you really only need the one on the line after uglifier.

Why am I getting this simple error when using `acts_as_taggable_on`?

I wanted to set up ActsAsTaggableOn.strict_case_match = true
According to http://5minutenpause.com/blog/2012/11/20/careful-where-you-get-your-gems-from/, it seems I have to download the gem from github. So I made it that way and tried to run App.
However, it returns this error:(
Error message: (I've tried bundle install but still the same error message!)
git://github.com/mbleigh/acts-as-taggable-on.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError)
Exception class:
PhusionPassenger::UnknownError
Here are my codes!
config/initializer/tag_list.rb
ActsAsTaggableOn.delimiter = ','
ActsAsTaggableOn.remove_unused_tags = true
ActsAsTaggableOn.strict_case_match = true
Gemfile
gem 'acts-as-taggable-on', git: 'git://github.com/mbleigh/acts-as-taggable-on.git'
I made a try to change the source to download the gem directly from to rubyorg, not from the Github. It's just like this.
gem 'acts-as-taggable-on', '2.3.3'
Now it returns this error:(
Error message:
undefined method `strict_case_match=' for ActsAsTaggableOn:Module
How can I solve this?
UPDATE:
Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
gem 'execjs'
gem 'therubyracer'
gem 'devise', '2.0.1'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'paperclip', "~> 3.0"
gem "cocaine"
gem 'mailboxer', '0.7.0'
gem 'sunspot_rails'
gem 'sunspot_solr'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
#gem 'rack-mini-profiler'
end
gem 'progress_bar'
gem 'kaminari', '0.14.0'
gem "sunspot_with_kaminari", '~> 0.1'
gem 'i18n_generators'
gem 'ancestry'
gem 'acts-as-taggable-on', '2.3.3'
gem 'acts_as_commentable_with_threading'
gem 'twitter-bootstrap-rails'
gem "less-rails"
gem 'crummy', '~> 1.6.0'
gem 'rails3_acts_as_paranoid'
gem 'galetahub-simple_captcha', :require => 'simple_captcha'
gem "acts_as_follower"
gem "jpmobile"
gem "rqrcode-rails3"
gem 'acts_as_votable', '~> 0.4.0'
gem 'rails3-jquery-autocomplete'
gem "cancan"
gem 'rinku', '1.5.1'
gem 'dalli'
gem "auto_html", '1.6.0'
gem "rails_autolink"
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
gem 'jquery-ui-rails'
end
gem 'jquery-rails'
# 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'
The problem is that the version 2.3.3 from acts-as-taggable-on was released 9 months ago and doesn't include the strict_case_match feature.
Your Gemfile has too look this this:
gem 'acts-as-taggable-on', git: 'git://github.com/mbleigh/acts-as-taggable-on.git'
the same way you had, and run:
bundle update acts-as-taggable-on
if that doesn't work, just delete your Gemfile.lock and run bundle install and bundle update
notice that its a development version of the gem, not ready for production, but you can take the risk and be a an alpha user of the gem and report any issue you find :)

Mercury: SyntaxError: cannot return a value from a constructor

Working on a fresh install of rails 3.2.8 and getting an error when compiling after adding Mercury:
SyntaxError: cannot return a value from a constructor: "this.element" in class Button
(in /home/*********/**************/vendor/bundle/ruby/1.8/bundler/gems/mercury-0c048033cd79/app/assets/javascripts/mercury/toolbar.button.js.coffee)
I've successfully installed Mercury using Rails 3.2.3, but haven't been able to figure why this wouldn't be working.
Any ideas?
source 'https://rubygems.org'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
gem 'bootstrap-sass'
gem 'simple_form'
gem 'json'
gem 'ckeditor'
gem 'mercury-rails', :git => 'https://github.com/jejacks0n/mercury.git'
gem 'jquery-rails'
# gem 'jquery-ui-rails'
gem "paperclip", "~> 2.7"
# To use ActiveModel has_secure_password
gem 'bcrypt-ruby', '~> 3.0.0'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', '0.10.2', :platforms => :ruby
gem 'libv8', '~> 3.3.10'
gem 'execjs'
gem 'uglifier', '>= 1.0.3'
end
https://github.com/jejacks0n/mercury/issues/349
i guess you need to lock into coffeescript 1.4.0
this fixed my issue.
Apparently, there is a fix, which is in the github repo, but not on rubygems, yet. If you don't want to downgrade coffee-script, just specify the repository in the Gemfile:
# Gemfile
# ...
gem 'mercury-rails', git: 'git://github.com/jejacks0n/mercury'
and run bundle update mercury-rails, afterwards. This fixed this problem for me without the need to downgrade coffee-script.
Here's what you actually need to type into your gemfile:
gem 'coffee-script-source', '1.4.0'

Installing the bundle for a MySQL Rail Application

When I say bundle install after some time I get the error:
Results logged to
/Users/JonyIve/.rvm/gems/ruby-1.9.3-p362#railsbabak/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.11), and Bundler cannot
continue. Make sure that gem install mysql2 -v '0.3.11' succeeds
before bundling.
So I do what it say, I run this command :
gem install mysql2 -v '0.3.11'
And then again I run Bundle Install but again I get the same error.
Where should I begin looking at to fix this issue?
And here is how my GemFile looks like:
source 'https://rubygems.org'
gem 'rails', '3.2.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
#START:mysql
group :production do
gem 'mysql2'
end
#END:mysql
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# 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
#START_HIGHLIGHT
gem 'capistrano'
#END_HIGHLIGHT
# To use debugger
# gem 'debugger'
gem 'will_paginate', '~> 3.0'
Reason for this error could be due to lack of mysql header, so make sure you have installed mysql headers properly.
For Ubuntu/Linux flavor, Use following command to install MySQL client and development package
sudo apt-get install mysql-client libmysqlclient-dev
For mac OS:
http://www.djangoapp.com/blog/2011/07/24/installation-of-mysql-server-on-mac-os-x-lion/
Regards!

Resources