My OS is ubuntu.
I have issue when I try to run 'rake db:create'.
greg@cm-test:/mydisk/ruby/blog/config$ rake db:create
(in /mydisk/ruby/blog)
Could not find gem 'mysql2 (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
Try running `bundle install`.
Here is what I did to fix this issue
1, find current libmysqlclient for your system. Then install it
greg@cm-test:/mydisk/ruby/blog/config$ sudo apt-get install libmysqlclient15-dev
2, After install mysql lib, need to install gem mysql
greg@cm-test:/mydisk/ruby/blog/config$ sudo gem install mysql -- --with-mysql-config=/usr/bin/mysql_config
You need to find correct path for mysql_config
greg@cm-test:/mydisk/ruby/blog/config$ sudo updatedb
greg@cm-test:/mydisk/ruby/blog/config$ locate mysql_config
3, do bundle all
greg@cm-test:/mydisk/ruby/blog/config$ sudo bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
Using builder (2.1.2)
Using i18n (0.4.2)
Using activemodel (3.0.3)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.6)
Using tzinfo (0.3.23)
Using actionpack (3.0.3)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.10)
Using actionmailer (3.0.3)
Using arel (2.0.4)
Using activerecord (3.0.3)
Using activeresource (3.0.3)
Using bundler (1.0.7)
Installing mysql2 (0.2.6) with native extensions
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
greg@cm-test:/mydisk/ruby/blog/config$ bundle show
Gems included by the bundle:
* abstract (1.0.0)
* actionmailer (3.0.3)
* actionpack (3.0.3)
* activemodel (3.0.3)
* activerecord (3.0.3)
* activeresource (3.0.3)
* activesupport (3.0.3)
* arel (2.0.4)
* builder (2.1.2)
* bundler (1.0.7)
* erubis (2.6.6)
* i18n (0.4.2)
* mail (2.2.10)
* mime-types (1.16)
* mysql2 (0.2.6)
* polyglot (0.3.1)
* rack (1.2.1)
* rack-mount (0.6.13)
* rack-test (0.5.6)
* rails (3.0.3)
* railties (3.0.3)
* rake (0.8.7)
* thor (0.14.6)
* treetop (1.4.9)
* tzinfo (0.3.23)
greg@cm-test:/mydisk/ruby/blog/config$ rake db:create
(in /mydisk/ruby/blog)
Subscribe to:
Post Comments (Atom)
-
Step 1, New a project rails new demo Step 2, Update Gemfile add paperclip, mysql2 gem, enable JavaScript runtime gem 'mysql2' ...
-
I used 7z to zip this file under Windows, try to unzip it under linux [ang@walker temp]$ gunzip 2011.sdf.zip gunzip: 2011.sdf.zip: unkno...
-
When trying to access transmission from web-browswer i got the message : 403: Forbidden Unauthorized IP Address. Either disable the IP ad...
No comments:
Post a Comment