I am experimenting with jruby-complete.jar and am getting some inconsistent behavior accross different operating systems.
On OS X 10.7 & 10.6 I tried downloading the jruby-complete-1.6.7.jar and running:
java -jar jruby-complete-1.6.7.jar -S gem list -l
I get an error:
LoadError: no such file to load -- rubygems
require at org/jruby/RubyKernel.java:1033
(root) at /usr/bin/gem:8
So I tried the same thing on a Windows 7 machine:
*** LOCAL GEMS ***
rake (0.8.7)
sources (0.0.1)
Both the OS X machine and the Windows machine are running java version "1.6.0_29". I do not have any ruby installations on the Windows 7 machine, but the OS X machines both have ruby installed.
What would be causing this to not work on OS X but it works on Windows?
Try setting the RUBYOPT shell variable to rubygems on your OSX box:
export RUBYOPT=rubygems
...and try again
Related
Rails version 6.0.4.6
Ruby Version 2.7.5p203
mySql version 8
OS Window 10
I am having issues getting the mysql2 gem to work. The latest error I have is not being able to locate "mysql2 x64-mingw32" file. I installed the gem using this command:
gem install mysql2 --platform=ruby -- --with-mysql-dir="C:\Program Files\MySQL\Connector C++ 8.0"
--with_mysql-lib="C:\Program Files\MySQL\Connector C++ 8.0\lib64" --with_mysql_include="C:\Program Files\MySQL\Connector C++ 8.0\include"
It appears to have been installed correctly but still will not work. I have run bundle install. I have also tried deleting the gem.lock file and the running bundle install.
If anyone has had success in getting ruby to work with MySQL on a Windows machine, please let me know how you did it.
After many trails, it appears the Ruby just doesn't play well with Windows OS. While I expect that some do use Ruby on Windows, it appears the support is lacking, and the community is small.
I installed a Linux terminal on my machine and had much better luck.
Just posting to keep other from pulling their hair out.
So I am getting the same issue as mentioned here -
gem install mysql failure in Snow Leopard
But I haven't been able to get it fixed using the answers on this link.
Here's a brief history -
I had MAMP on my machine,
but now I downloaded the latest MySQL from mysql.com and installed version 5.1.46
this new version runs fine and client "mysql" is able to connect
and I also have XCode v3.2.1, since someone mentioned that it can cause issues.
Here's the error -
**Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --with-mysql-config=/usr/local/mysql/bin/mysql_config
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out**
"can't find header files for ruby" usually means that the system can't locate the header files for Ruby. This happened to me when I upgraded to 10.6 from 10.5. Download the latest XCode from Apple's site and reinstall it. Make sure that you check the box for "UNIX Development" during the install. The header files for Ruby are not in the main package.
Have you installed other versions of Ruby or are you using the standard 1.8.7 that comes with OS X? You can check your version of ruby by typing ruby -v at a terminal prompt.
I installed MonoDevelop 2.2 for the Mac OS X and when I start I get the error described on the title. The weird thing is that I already installed the mono framework.
Any ideas?
apparently my Mac OS X installation was corrupted and the grep command (among other commands) was missing. It seems like MonoDevelop uses the grep command to get the MonoFramework version and it was erroring out. A fresh new install of the OS solved my problem
When I try and use a populator or sphinx on a Ruby app I keep receiving dyld errors. I used to use MAMP on OS X Leopard but since I've upgraded to Snow Leopard and am now using standalone MySQL (10.5 64-bit).
$ rake ts:index
Would return
dyld: Library not loaded: /Applications/MAMP/Library/lib/mysql/libmysqlclient.15.dylib
Referenced from: /usr/local/bin/indexer
Reason: image not found
rake aborted!
Even though to remove MAMP I just deleted the /Applications/MAMP directory. But it still looks like dylib has references to it.
I've tried running:
$ sudo update_dyld_shared_cache -verify
and restarting but the problem still persists.
OS X 10.6.1, MySQL 5.0.85 (x86_64)
http://twitter.com/BouldrMatt fixed it.
I installed the ruby gem for mysql and it looks like it installed correctly except for the documentation.
I reviewed http://www.rhinocerus.net/forum/lang-ruby/587057-gem-install-mysql-returns-list-no-definition-xyz.html but it didn't help.
Some notes, I am running on a 32-bit intel processor. Mac os x 10.6.1
Mac-Shaun:usr shaun$ sudo gem install mysql
Building native extensions. This could take a while...
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1...
No definition for next_result
No definition for field_name
..
..
More No Definitions.
..
..
[1]: http://www.rhinocerus.net/forum/lang-ruby/587057-gem-install-mysql-returns-list-no-definition-xyz.html "some posts in comp.lang.ruby" that match my issue
If you upgraded to Snow Leopard or this is your first time installing rails on your Mac, you need to do some prep work.
First, all Intel based Macs are 64 bit. You need to install the 64 bit version of MySQL. If you have installed the 32 bit version, you will need to remove it.
Second, you will have to install XCode bundled with Snow Leopard. This is available on the Snow Leopard install disk.
Finally, if you have upgraded from Leopard to Snow Leopard and installed your own version of ruby on Leopard, you need to remove it. Snow Leopard is bundled with Ruby 1.8.7, and having multiple versions of ruby will cause conflicts.
I've documented the whole process on my blog.