- 调用Ruby语言和JRuby语言软件包出现的问题(RubyGems配置问题)
错误信息:
LoadError: no such file to load
解决办法:
* 在文件层面中自己增加一行下面的代码require 'rubygems'
* 在irb工具和jirb工具中,或者在使用命令行irb或者jirb中调入rubygems,命令如下;或者进入了irb工具以后输入上面的命令,再调用自己的Ruby语言程序。
Ruby语言运行环境irb -r rubygems
JRuby语言运行环境jirb -r rubygems
* 在运行环境基础上解决办法
Ruby语言运行环境设置环境变量SET RUBYOPT=rubygems
JRuby语言运行环境设置环境变量SETJRUBY_OPTS=-rubygems - 执行JRuby语言程序错误
错误信息:
输入行太长。
此时不应有 :gotCP
。
解决办法:
关闭终端重新启动终端就可以了,这个错误可能是JRuby语言运行环境的问题。
流思
2007年10月21日星期日
Ruby和JRuby语言错误信息说明
2007年10月17日星期三
JRuby Swing中显示中文
转换编码
我们需要require 'iconv' 库, 然后执行
Iconv.conv("utf8","GBK","....") #把字符由GBK转换为UTF8
当源字符集中含有非法编码的时候,我们需要告诉iconv忽略, 否则iconv会报错停止
Iconv.conv("utf8//IGNORE","GBK//IGNORE","....")
Using MySQL in Batch Mode
You can also run mysql in batch mode. To do this, put the commands you want to
In the previous sections, you used mysql interactively to enter queries and view the results. You can also run mysql in batch mode. To do this, put the commands you want to run in a file, then tell mysql to read its input from the file:
shell>mysql <batch-file
If you are running mysql under Windows and have some special characters in the file that cause problems, you can do this:
C:\>mysql -e "sourcebatch-file"
If you need to specify connection parameters on the command line, the command might look like this:
shell>mysql -hhost-uuser-p <batch-file
Enter password: ********
When you use mysql this way, you are creating a script file, then executing the script.
If you want the script to continue even if some of the statements in it produce errors, you should use the --force command-line option.
The default output format is different (more concise) when you run mysql in batch mode than when you use it interactively. For example, the output of SELECT DISTINCT species FROM pet looks like this when mysql is run interactively:
+---------+
| species |
+---------+
| bird |
| cat |
| dog |
| hamster |
| snake |
+---------+
In batch mode, the output looks like this instead:
species
bird
cat
dog
hamster
snake
If you want to get the interactive output format in batch mode, use mysql -t. To echo to the output the commands that are executed, use mysql -vvv.
You can also use scripts from the mysql prompt by using the source or \. command:
mysql>source filename;
mysql>\. filename
Solaris's Open Source
Q: v240装好了Solaris 10,使用JDS用Xmanager远程登陆,进入后鼠标正常。但键盘不能输入。什么原因?
A: 需要安装两个patch,编号叫做119412-07和119542-06。
Soalris 10的补丁现在确实是收费的了!
Solaris 10系统免费,服务(包括补丁)收费,Sun的政策!