Rails installation windows 7 bad file descriptor mysql2 -
for past 1 day, im trying , getting this,
c:\dev\man>rake db:create --trace ** invoke db:create (first_time) ** invoke db:load_config (first_time) ** execute db:load_config ** invoke rails_env (first_time) ** execute rails_env ** execute db:create rake aborted! bad file descriptor c:/ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/active_record/c onnection_adapters/mysql2_adapter.rb:312:in `query' c:/ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/active_record/c onnection_adapters/mysql2_adapter.rb:312:in `execute'
gem install mysql2 -v '0.2.6' # successful
what bad file descriptor??
i followed here, ruby on rails : rake aborted bad file descriptor didn't work
im unsure these 2 files
c:\program files\mysql\mysql server 5.6\lib\libmysql.dll c:\ruby193\bin\libmysql.dll
im on windows 7, rails 3.2.12 , mysql 5.6, ruby 1.9.3
please help!
i understood problem 32 bit , 64 bit.
i use ubuntu 12.04. know there no point in using rails on windows. has done designer able view app.
the root of evil mysql2 0.2.6 gem. knew, if installed mysql2 latest version good.
- i uninstalled mysql 5.6.
- downloaded mysql 5.5.32 32-bit http://dev.mysql.com/downloads/mysql/5.5.html#downloads installed in standard way
- already rails 3.2.12, ruby 1.9.3 installed in windows 7 system(like in here http://rorguide.blogspot.in/2011/03/installing-mysql2-gem-on-ruby-192-and.html)
- now, searched right path mysql server 5.5 installed, has here "c:\program files\mysql\mysql server 5.5\bin", here "c:\program files (x86)\mysql\mysql server 5.5\bin"
- how know this, cd "c:\program files (x86)\mysql\mysql server 5.5\bin" , try "mysql" should not "command not found"
- now, gem install mysql2 -- '--with-mysql-lib="c:\program files (x86)\mysql\mysql server 5.5\lib" --with-mysql-include="c:\program files\mysql\mysql server 5.5\include"'
thats it.
bundle install rake db:migrate
Comments
Post a Comment