Tag: debian

当我在新项目上尝试命令rails server时,我收到此错误

我正在运行Debian 7.我正在使用RVM。 我也在运行mySQL。 我是ruby的新手以及rails。 如果我看起来很天真,请原谅我。 我设置了一个项目: rails new projectname -d mysql 然后我进入该目录并运行: rails server 然后我得到这个错误: /home/user/.rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.0/lib/execjs/runtimes.rb:51:in `autodetect’: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.0/lib/execjs.rb:5:in `’ from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/execjs-2.0.0/lib/execjs.rb:4:in `’ from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require’ from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `’ from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require’ from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `’ from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require’ from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in […]

退出时ruby1.9分段故障

我在这里变得疯狂,只是试图在我的服务器上部署一个小测试应用程序,并且每当ruby退出时(即在运行rake资产:预编译或退出控制台等之后)我都会遇到seg故障。 刚跑 script/rails r -e production “puts 1” 会导致 1 [BUG] Segmentation fault ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] — C level backtrace information ——————————————- /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/libruby.so.1.9 [0x7f92fd681f25] /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/libruby.so.1.9 [0x7f92fd55608c] /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/libruby.so.1.9(rb_bug+0xb8) [0x7f92fd556208] error.c:277 /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/libruby.so.1.9 [0x7f92fd60db77] /lib/libpthread.so.0 [0x7f92fd2e5a80] /lib/libselinux.so.1 [0x7f92f0db831d] /lib/libselinux.so.1 [0x7f92f0dab57f] — Other runtime information ———————————————– Segmentation fault 注意脚本/ rake任务,无论运行什么,但退出 – > seg fault 奇怪的是,这只发生在我的服务器上(debian lenny,rvm,ruby […]

目前没有安装“rails”程序?

我已经安装了Ruby(1.8.7通过apt-get)并且我安装了Rails(2.3.2通过rubygems)但是当我输入’rails newapp’时,我收到此错误: The program ‘rails’ is currently not installed. You can install it by typing: sudo apt-get install rails rails: command not found 当我运行’gem list’时,它会显示rails及其所有依赖项。 知道可能出了什么问题吗?

在Debian Squeeze上安装mysql2 gem时出错

在Debian Squeeze上安装mysql2 gem时出现这个“流行”错误: gem install mysql2 Building native extensions. This could take a while… ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb checking for rb_thread_blocking_region()… yes checking for rb_wait_for_single_fd()… no checking for mysql.h… yes checking for errmsg.h… yes checking for mysqld_error.h… yes creating Makefile make gcc -I. -I/usr/local/rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux -I/usr/local/rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/usr/local/rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 […]

在debian Squeeze上安装RoR

有没有办法在我的debian squeeze上安装Ruby 1.9.2或1.8.7 + Rails 3?

“SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书validation失败”

我正在设置Redmine来通过IMAP从gmail中查询电子邮件。 尝试运行适当的Ruby任务会导致以下错误: SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书validation失败 当Ruby尝试通过OpenSSL连接imap.gmail.com时出现错误,如下代码行: imap = Net::IMAP.new(host, port, ssl) 当我尝试从OpenSSL命令行连接上述主机时,它成功连接。 我知道Ruby没有找到一些证书,我看到了各种解决方案提案,但不幸的是我仍然无法弄清楚如何解决这个问题(我不使用rvm)。 我试图通过设置OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE来禁用validation,但得到“动态常量赋值”错误。 我的环境: Linux debianvm 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux root@debianvm:~# ruby –version ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux] root@debianvm:~# rails –version Rails 3.2.13

Ruby on Linux PTY在没有EOF的情况下消失,引发了Errno :: EIO

我正在编写一些带有文件的代码,将该文件传递给多个二进制文件之一进行处理,并监视转换过程中的错误。 我已经在OSX上编写并测试了以下例程,但linux因为我不清楚的原因而失败。 #run the command, capture the output so it doesn’t display PTY.spawn(command) {|r,w,pid| until r.eof? do ##mark puts r.readline end } 运行的命令变化很大,##标记处的代码已简化为本地回显以尝试调试问题。 该命令执行,脚本在终端中打印预期的输出,然后抛出exception。 它在Debian系统上产生的错误是: Errno::EIO (Input/output error – /dev/pts/0): 我可以提出的所有命令字符串都会产生错误,当我运行没有本地echo块的代码时,它运行得很好: PTY.spawn(command) {|r,w,pid|} 在任何一种情况下,命令本身执行正常,但似乎debian linux没有发送eof up the pty。 PTY文档页面和ruby-doc上的IO似乎没有任何帮助。 有什么建议? 谢谢。 -vox-