我是初学者,我从https://github.com/rubytaiwan/jobs.ruby.tw
获得演示但是当我尝试运行此演示时,我收到了一个错误。
我按照
运行bundle
我收到了错误
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.
但我确定我已经安装了mysql2
而Gemfile
是
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
然后我尝试评论这一行:
gem 'mysql2'
但我仍然有错误。 所以我不知道为什么会出现这种错误
答案 0 :(得分:83)
试试吧
sudo apt-get install mysql-client libmysqlclient-dev
答案 1 :(得分:5)
brew install mysql, then
put in your Gemfile
gem 'mysql 2', '0.3.18'
run bundle
这个设置对我有用,我有El Captain OS,rails 4.2.6,希望这有帮助
答案 2 :(得分:4)
尝试这个
Sub CreateAndNameWorksheets()
Dim c As Range
Application.ScreenUpdating = False
For Each c In Sheets("Master").Range("A1:A50")
Sheets("Template").Copy After:=Sheets(Sheets.Count)
With c
ActiveSheet.Name = .Value
.Parent.Hyperlinks.Add Anchor:=c, Address:="", SubAddress:= _
"'" & .Text & "'!A1", TextToDisplay:=.Text
End With
Next c
Application.ScreenUpdating = True
End Sub