小编Hol*_*ust的帖子

在新的RHEL6服务器上安装ruby-filemagic gem时遇到困难

它似乎在寻找libmagic.so.1文件.我有那个档案.它位于/ usr/lib64中.我没有以root用户身份运行此安装.

我也在使用rvm和Bundler.这是我的"bundle"命令的结果,当它到达我的Gemfile中的ruby-filemagic行时:

[server@mine ext]$ ruby extconf.rb --with-magiclib
checking for magic_open() in -ltrue... no
*** ERROR: missing required library to compile this module
*** 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.
Run Code Online (Sandbox Code Playgroud)

更新:

以下是mkmf.log的结果:

have_library: checking for magic_open() in -ltrue... -------------------- no

"gcc -o conftest -I. -I/usr/local/rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/x86_64-linux -I.    -g -O2  -fPIC   conftest.c  -L. -L/usr/local/rvm/rubies/ruby-1.8.7-p358/lib -Wl,-R/usr/local/rvm/rubies/ruby-1.8.7-p358/lib -L.  -rdynamic -Wl,-export-dynamic …
Run Code Online (Sandbox Code Playgroud)

ruby rubygems bundler ruby-on-rails-3.1

12
推荐指数
3
解决办法
3696
查看次数

Virtualbox"Callee RC:REGDB_E_CLASSNOTREG"(0x80040154)?

我遇到了Virtualbox问题

Callee RC:REGDB_E_CLASSNOTREG"(0x80040154)

突然间.在VirtualBox 4.3上开始出现问题(我认为).我升级到版本5希望修复它,但在那一点上没有运气.

virtualbox

12
推荐指数
3
解决办法
5万
查看次数

将Google计算引擎实例迁移到其他区域

我正在尝试将几个计算引擎实例从欧洲迁移到亚洲.我需要这样做,因为这些服务器的大多数用户都在亚洲,他们可以更快地访问他们所在地区的服务器.我正在尝试遵循命令.

gcloud compute instances move asiawindows1 --zone europe-west1-d  --destination-zone asia-east1-c
Run Code Online (Sandbox Code Playgroud)

我尝试这个时出现以下错误

属于子网的实例无法在区域间移动.

移动这些服务器而不在亚洲区域手动设置它们的最佳方法是什么?

google-compute-engine

11
推荐指数
3
解决办法
5587
查看次数

获取CKEditor内容? - jQuery

我的CKEditor代码是

window.onload = function()
{
    var editor = CKEDITOR.replace( \'big_info\' );
    CKEDITOR.config.height = \'330px\';
    CKEDITOR.config.toolbar_Full =
    [
        [\'Source\',\'-\',\'Templates\'],
        [\'Maximize\', \'ShowBlocks\'],
        [\'Cut\',\'Copy\',\'Paste\',\'PasteText\',\'PasteFromWord\',\'-\',\'SpellChecker\', \'Scayt\'],
        [\'Undo\',\'Redo\',\'-\',\'Find\',\'Replace\',\'-\',\'SelectAll\',\'RemoveFormat\'],
        [\'TextColor\',\'BGColor\'],

        [\'NumberedList\',\'BulletedList\',\'-\',\'Outdent\',\'Indent\',\'Blockquote\'],
        \'/\',
        [\'Bold\',\'Italic\',\'Underline\',\'Strike\',\'-\'],
        [\'Styles\',\'Format\',\'Font\',\'FontSize\'],
        [\'JustifyLeft\',\'JustifyCenter\',\'JustifyRight\',\'JustifyBlock\'],
        [\'Link\',\'Unlink\',\'Anchor\'],
        [\'Image\',\'Flash\',\'Table\',\'HorizontalRule\',\'PageBreak\']
    ];

    CKFinder.SetupCKEditor( editor, { BasePath : \'/javascript/ckfinder/\', RememberLastFolder : false } ) ;
};
Run Code Online (Sandbox Code Playgroud)

我想获取编辑框的内容并通过我的jQuery脚本中的JSON发送它.我找不到怎么做.

javascript jquery ckeditor

10
推荐指数
1
解决办法
4万
查看次数

rails - postgres错误:原因:不兼容的库版本:libpq.5.dylib需要1.0.0或更高版本,

我在Mac(10.6.8)上遇到了Ruby(1.9.3),Rails和Postgres(9.0.8)的设置.每次运行时rails console我都会收到以下错误:

/Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/pg-0.13.2/lib/pg.rb:4:in `require': dlopen(/Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/pg-0.13.2/lib/pg_ext.bundle, 9): Library not loaded: @loader_path/../lib/libssl.dylib (LoadError)
  Referenced from: /usr/lib/libpq.5.dylib
  Reason: Incompatible library version: libpq.5.dylib requires version 1.0.0 or later, but libssl.0.9.8.dylib provides version 0.9.8 - /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/pg-0.13.2/lib/pg_ext.bundle  
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/pg-0.13.2/lib/pg.rb:4:in `<top (required)>'
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `require'
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `each'
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `block in require'
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
    from /Users/dc/Documents/Aptana Studio 3 Workspace/http/config/application.rb:7:in `<top (required)>'
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/railties-3.2.6/lib/rails/commands.rb:39:in `require'
    from /Users/dc/.rvm/gems/ruby-1.9.3-head@global/gems/railties-3.2.6/lib/rails/commands.rb:39:in `<top (required)>'
    from script/rails:6:in …
Run Code Online (Sandbox Code Playgroud)

ruby postgresql macos ruby-on-rails osx-snow-leopard

10
推荐指数
2
解决办法
8819
查看次数

使用worker启动Puma服务器时出错

我是Rails和Puma的新手,所以这个问题可能因为简单的解决方案而过于愚蠢,如果你认为我做错了什么也请指导我.

我正在尝试为工作人员启动Puma服务器.如果我将工人设置为0

puma -w0
Run Code Online (Sandbox Code Playgroud)

服务器启动完美,但如果我将worker设置为1或更多,则会出现以下错误:

E:\RoR_tryouts\ws_13.11.13\todo>puma -w3
[2120] *** SIGUSR2 not implemented, signal based restart unavailable!
[2120] *** SIGUSR1 not implemented, signal based restart unavailable!
[2120] Puma starting in cluster mode...
[2120] * Version 2.7.1, codename: Earl of Sandwich Partition
[2120] * Min threads: 0, max threads: 16
[2120] * Environment: development
[2120] * Process workers: 3
[2120] * Phased restart available
[2120] * Listening on tcp://0.0.0.0:9292

C:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.7.1/lib/puma/cluster.rb:229:in `trap': unsupported signal SIGCHLD (ArgumentError)
        from C:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.7.1/lib/puma/cluster.rb:229:in `run'
        from C:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.7.1/lib/puma/cli.rb:442:in `run'
        from …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails puma

10
推荐指数
2
解决办法
8192
查看次数

ruby 与 jemalloc 无法配置 - homebrew/OSX/montery/m1/arm(?)

OSX/Monterey/M1/Arm/Homebrew:我一生都无法让它工作:

./configure --with-jemalloc
Run Code Online (Sandbox Code Playgroud)

它死了

checking jemalloc/jemalloc.h presence... no
configure: error: jemalloc requested but not found
Run Code Online (Sandbox Code Playgroud)

即使它就在那里:/opt/homebrew/Cellar/jemalloc/5.2.1_1/include/jemalloc/jemalloc.js

brew --prefix jemalloc一切看起来都是jemalloc-config --includedir正确的。

我尝试过各种版本:

export RUBY_CONFIGURE_OPTS="--with-jemalloc-include=$(brew --prefix jemalloc)/include
Run Code Online (Sandbox Code Playgroud)

和/或

./configure --with-jemalloc-include=$(brew --prefix jemalloc)/include
Run Code Online (Sandbox Code Playgroud)

但没有骰子。甚至不确定这些环境变量/标志是否受到 ruby​​ 的尊重,或者它们是否是一些 rvm/rbenv/ruby-build 的东西。

我打算直接使用 ruby​​ 的配置而不是 rvm/build 工具进行所有测试。

ruby jemalloc

10
推荐指数
1
解决办法
968
查看次数

在 macOS 12.5 上安装 Ruby 3.1.2 时出错

我正在尝试在 macOS 12.5 上安装 Ruby 3.1.2,使用 chruby 作为我的版本管理器。

运行ruby-install ruby,我收到此错误:

>>> Extracting ruby-3.1.2.tar.xz to /Users/justin/src/ruby-3.1.2 ...
/usr/local/bin/../share/ruby-install/util.sh: line 56: xzcat: command not found
/usr/local/bin/ruby-install: line 46: cd: /Users/justin/src/ruby-3.1.2: No such file or directory
>>> Regenerating ./configure script ...
autoreconf: error: 'configure.ac' is required
!!! Configuration of ruby 3.1.2 failed!
Run Code Online (Sandbox Code Playgroud)

我不太确定如何解决这个问题。有人可以给我一些建议吗?

ruby ruby-install

9
推荐指数
1
解决办法
2504
查看次数

使用less(2.2.1)引发需要therubyracer的错误(无法在windows上安装therubyracer)

我一直在努力让twitter-bootstrap-rails gem在我的windows机器上工作,并且在尝试安装'therubyracer'宝石时遇到了错误,这是一个较旧版本的较少宝石的依赖.

我认为升级到较低的2.2.1,这不依赖于therubyracer,但尽管它似乎认为我仍然需要安装therubyracer.这是我尝试启动rails服务器'rails s'时得到的错误输出.

$ rails s
[WARNING] Please install gem 'therubyracer' to use Less.
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- v8 (LoadError)
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/java_script/v8_context.rb:2:in `<top (required)>'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/java_script.rb:9:in `default_context_wrapper'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/java_script.rb:17:in `context_wrapper'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/loader.rb:10:in `initialize'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less.rb:14:in `new'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less.rb:14:in `<module:Less>'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less.rb:9:in `<top (required)>'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require' …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails less twitter-bootstrap-rails therubyracer

8
推荐指数
1
解决办法
6940
查看次数

外部 URL / Rails 6.11 / Ruby 3 没有这样的文件或目录@rb_sysopen

这在 Rails 6 中运行良好,但现在将 Rails 和 Ruby 升级到 6.11 和 3,它触发了这个“经典”错误。基本上,简而言之,例如这个外部 URL 直接指向 Firefox 徽标,使用 Rails 控制台:

require 'open-uri'
open("https://brandemia.org/sites/default/files/inline/images/firefox_logo.jpg")
Run Code Online (Sandbox Code Playgroud)
Traceback (most recent call last):
        4: from (irb):1:in `<main>'
        3: from (irb):2:in `rescue in <main>'
        2: from (irb):2:in `open'
        1: from (irb):2:in `initialize'
Errno::ENOENT (No such file or directory @ rb_sysopen - https://brandemia.org/sites/default/files/inline/images/firefox_logo.jpg)
Run Code Online (Sandbox Code Playgroud)

在应用程序中相同的错误。在 Rails 和 Ruby 升级(使用 Ruby 2.5.8 和 Rails 6.0.3.1)之前,这工作得很好。

ruby

8
推荐指数
2
解决办法
1349
查看次数