我正在尝试在OS X 10.6上安装"sqlite3-ruby"gem(或"sqlite3"gem).我正在使用ruby-1.9.2,目前我得到以下内容:
$ sqlite3 --version
3.7.4
$ sudo gem install sqlite3
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/Users/folken/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb
checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir …Run Code Online (Sandbox Code Playgroud) 我在Eclipse上常常遇到麻烦(并且一般都很迟钝)而且我想知道是否有人能给我任何见解.抛出的消息是"无法创建新的本机线程".此时我被提示重启Eclipse.这种情况每天发生5次左右.
我正在使用Ecliipse Helios Service Release 2(使用Flash Builder插件):
Windows Vista Business
Processor: Intel Core 2 Duo T7500 @ 2.20 GHz
Memory (RAM): 4.00 GB
System Type: 32-bit Operating System
Run Code Online (Sandbox Code Playgroud)
我的eclipse.ini设置是从这个线程中偷来的:eclipse最好的jvm设置是什么:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
-vm
C:/jdk1.6.0_25/jre/bin/client/jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Declipse.p2.unsignedPolicy=allow
-Xmn256m
-Xms1024m
-Xmx1024m
-Xss4m
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+CMSIncrementalPacing
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods
-Dcom.sun.management.jmxremote
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助!
编辑:
@normalocity - 字面上刚刚发生的错误(未处理的事件循环异常),这是在调整我的eclipse.ini之后(我将Xss更改为1m,MaxPermSize更改为384m,Xms更改为512).以下是您要求的其他信息,异常堆栈跟踪:
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at …Run Code Online (Sandbox Code Playgroud) 我需要确定从服务返回的某些文件的mime类型,我不知道他们的文件扩展名或他们的类型是什么,基本上我们从API检索文档,如:" http:// site. com/getFile/BFD843DFLKXJDF "最后的随机文本是某个文件.
<input type="button" value="Click Me" onClick="alert(document.getElementById('iframeID').contentDocument.contentType);">
<iframe id="iframeID" src="http://site.com/getFile/BFD843DFLKXJDF" width="600" height="600" />
Run Code Online (Sandbox Code Playgroud)
这适用于Firefox,它在警告对话框中返回:pdf文件的"application/pdf".然而,Internet Explorer是我需要定位的主要浏览器,"contentDocument"没有定义(显然我只使用"文档"),但"contentType"也未定义,我不知道IE等价物是什么(谷歌搜索没有产生任何结果).
非常感谢帮助,谢谢.
我在尝试安装名为typhoeus的宝石时收到错误(这用于下面的"面向服务导向设计与Rails"一书) - 我已经尝试了很多东西试图解决这个问题,但我已经打了一堵砖墙,我发布在这里,希望有人可以提供帮助.
这是输出:
$ gem install typhoeus
Building native extensions. This could take a while...
ERROR: Error installing typhoeus:
ERROR: Failed to build gem native extension.
/Users/my.name/.rvm/rubies/ruby-1.8.7-p302/bin/ruby extconf.rb
checking for curl/curl.h in /opt/local/include,/opt/local/include/curl,/Users/my.name/.rvm/rubies/ruby-1.8.7-p302/include/curl,/Users/my.name/.rvm/rubies/ruby-1.8.7-p302/include,/usr/include/curl,/usr/local/include/curl... yes
checking for curl_easy_init() in -lcurl... yes
creating Makefile
make
gcc -I. -I. -I/Users/my.name/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/i686-darwin10.5.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -fno-common -pipe -fno-common -g -DXP_UNIX -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -c native.c
In file included from /usr/local/include/curl/curl.h:35,
from ./native.h:5,
from native.c:1:
/usr/local/include/curl/curlrules.h:143: error: size …Run Code Online (Sandbox Code Playgroud) ruby ×2
eclipse ×1
eclipse-3.6 ×1
gem ×1
helios ×1
install ×1
javascript ×1
jvm ×1
mime-types ×1
rubygems ×1
rvm ×1
sqlite ×1
sqlite3-ruby ×1