mysql2

Please install mysql adapter 'gem install activerecord-mysql-adapter'

最后都变了- 提交于 2019-11-29 01:28:59
问题 I'm having trouble finding a solution to this problem. I'm getting the error: Please install the mysql adapter: 'gem install activerecord-mysql-adapter' /Users/ Andy/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:143:in `block in replace_gem': Please install the mysql adapter: `gem install activerecord-mysql-adapter` (mysql is not part of the bundle. Add it to Gemfile.) (LoadError) from /Users/ Andy /mysql2/ruby/1.9.1/gems/activerecord-3.2.1/lib

How to use “mysql2” gem in Rails 3 application on Windows 7?

和自甴很熟 提交于 2019-11-28 23:25:54
问题 I try to install the mysql2 gem on Windows 7 32-bit. I run: gem install mysql2 and I get the following error: ERROR: Error installing mysql2: The 'mysql2' native gem requires installed build tools. Please update your PATH to include build tools or download the DevKit from 'http://rubyinstaller.org/downloads' and follow the instructions at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit' Any ideas what could cause this error, and how to solve this ? UPDATE I did everything as

Install mysql2 gem on Snow Leopard for Rails 3 with rvm

本小妞迷上赌 提交于 2019-11-28 18:38:17
I have recently upgraded to Rails 3 and created a new application with Rails 3.0.3, but I keep getting an error Macintosh:$ rails server => Booting WEBrick => Rails 3.0.3 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2010-11-28 11:32:47] INFO WEBrick 1.3.1 [2010-11-28 11:32:47] INFO ruby 1.8.7 (2010-04-19) [i686-darwin10.4.0] [2010-11-28 11:32:47] INFO WEBrick::HTTPServer#start: pid=1055 port=3000 Started GET "/" for 127.0.0.1 at Sun Nov 28 11:32:52 +0000 2010 RuntimeError (!!! Missing the mysql2 gem. Add it to your Gemfile:

Creating tables and problems with primary key in Rails

有些话、适合烂在心里 提交于 2019-11-28 16:58:33
When I try to run the following code in Rails using Mysql2 as database manager: rake db:migrate I obtain the following error: rake aborted! "Mysql2::Error: All parts of a PRIMARY KEY must be NOT NULL:" Why do I get this error, if the primary key in a table by default is NOT "null"? Migration code, however : class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.string "first_name" t.timestamps end end end Bater Chen I had a same problem before, and I solved according to here https://github.com/rails/rails/pull/13247#issuecomment-32425844 With Rails 2.3.5, MySQL

Mysql 5.6 headaches on Mac OSX

那年仲夏 提交于 2019-11-28 16:30:18
Several of my colleagues and I have recently upgraded from MySQL 5.5 to MySQL 5.6 using homebrew on our Macs to test locally before upgrading our servers. Since this upgrade, we all have been experiencing intermittent MySQL errors when running our rails code: Lost connection to MySQL server at 'sending authentication information', system error: 32 We have tried re-making our usernames and passwords in our database, and upping the connection timeout, but neither have fixed the problem. The error logs do not mention the issue. The only workaround we have found when we run into the problem is to

cannot load such file — mysql2/2.4/mysql2 (LoadError) - windows

风流意气都作罢 提交于 2019-11-28 08:57:19
问题 I am new on Ruby on Rails. My Ruby version is ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]. I have created a new project using rails new sample_cms -d mysql command. The command rails server is throwing following error. C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mysql2-0.4.6-x64-mingw32/lib/mysql2/mysql2.rb:2:in `require': cannot load such file -- mysql2/2.4/mysql2 (LoadError) I have installed mysql and mysql Connector C. I have installed the mysql2 gem like that. gem install mysql2

RubyMine 3.0 setup on Windows 7

三世轮回 提交于 2019-11-28 08:50:37
All, I downloaded/installed 1.9.2 windows installer, and then RubyMine3.0RC, and installed it. Opening a new Rails project, with mysql selected as the DB, gives the following error when I "RUN" it. D:\ProgramFiles\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Users/Rob/RubymineProjects/test1/script/rails server -p 3000 -b 127.0.0.1 -e development D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': 126: The specified module could not be found. - D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2

mysql2.so: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory

↘锁芯ラ 提交于 2019-11-28 07:23:07
I am trying to run a Rails two app with Ubuntu 10.04 server, sphinx, myql2 version 0.2.7 and percona server 5.5 (Myslql 5.5). mysql2 in irb works ok, I can connect to the db. this rails 2 app is working in another Centos server with MySql 5.1. When I run: script/server -e production I get: mysql2.so: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory here are the libs I have: # ls -l /usr/lib |grep sql -rw-r--r-- 1 root root 10581008 2011-11-18 16:51 libmysqlclient.a lrwxrwxrwx 1 root root 16 2011-12-10 05:48 libmysqlclient_r.a -> libmysqlclient.a lrwxrwxrwx 1

Installing Mysql 2 gem fails

女生的网名这么多〃 提交于 2019-11-28 07:18:54
问题 I am trying to install mysql2 (version 0.4.5 ) and I am using Rails 5.0.2 , Ruby 2.3.1 I've already installed mysql server using homebrew (version 8.0.11)and started mysql as: brew install mysql brew services start mysql Gemfile.rb gem 'mysql2' When I try installing gem mysql2 I am getting the following error Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/gomathi/.rvm/gems/ruby-2.3.1@connector/gems/mysql2-0.4.5/ext/mysql2 creating Makefile current

Unable to install mysql2 gem OS X Mountain Lion

徘徊边缘 提交于 2019-11-28 03:57:48
问题 I'm new with RoR and I'm trying to install Mysql2 -v '0.3.11'. I have OS X Mountain Lion, rails 3.2.6 ,ruby 1.9.3. Below is the error I get. I looked everywhere and didn't find anything. $gem install mysql2 -v '0.3.11' Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /Users/curiosity/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single