Tag: rubygems

安装RDoc文档时出错:不兼容的编码正则表达式匹配

在过去一周,在一些gem安装或gem更新操作中,我收到了类似这样的错误: 错误:为sinatra-1.3.1生成文档时… MESSAGE:生成错误C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/doc/sinatra-1.3.1/rdoc/README_de_rdoc.html :不兼容的编码regexp匹配(UTF-8 regexp与IBM437字符串)(Encoding :: CompatibilityError) 类似的: 错误:为rest-client-1.6.7生成文档时… MESSAGE:生成错误C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/doc/rest-client-1.6.7/rdoc /README_rdoc.html:不兼容的编码regexp匹配(UTF-8 regexp与IBM437字符串)(Encoding :: CompatibilityError) 可能还有一个地方。 我已经读过这篇文章,但是找不到我没写的代码和我无法控制的数据的解决方案。 知道如何解决这个问题吗?

将gem拆开/冻结成非铁轨ruby应用程序

我正在编写一个非Rails ruby​​应用程序(喘气!),并希望能够在vendor子目录中包含应用程序所需的所有gem依赖项。 这类似于http://gemsonrails.rubyforge.org/如何为Rails应用程序工作。 这里的目标是避免在添加新依赖项时我的团队目前遇到的情况。 我的团队中的每个开发人员都必须手动安装gem,然后有人必须手动更新每个测试和登台和生产计算机。 如果我们可以将依赖关系冻结到分布式应用程序本身,那么只需要一个简单的svn更新(或人群中那些嬉皮士的git pull)。

运行autoconf时rvm install 1.9.2失败了吗?

我跑的时候 rvm install 1.9.2 尝试运行autoconf时出错。 这是堆栈跟踪: kenmare:ruby-1.9.2-p0 lee$ rvm install 1.9.2-p0 /Users/lee/.rvm/rubies/ruby-1.9.2-p0, this may take a while depending on your cpu(s)… ruby-1.9.2-p0 – #fetching ruby-1.9.2-p0 – #extracted to /Users/lee/.rvm/src/ruby-1.9.2-p0 (already extracted) Running autoconf Error running ‘autoconf’, please check /Users/lee/.rvm/log/ruby-1.9.2-p0/autoconf.error.log Skipping configure step, ‘configure’ does not exist, did autoconf not run successfully? ruby-1.9.2-p0 – #compiling Error […]

深入Ruby Gem开发资源(书籍,video,网站)

我正在为Rails项目编写我的第一个Gem,并且正在寻找有关此主题的深入信息,我一无所获。 我不是在寻找“如何构建gem”,而是关于该主题的相关开发人员指南或资源(使用Ruby进行分布式编程等)。 我希望如果有人有好的参考资料? 提前致谢。

OmniAuth Facebook过期令牌错误

我正在使用OmniAuth在我的应用程序中访问Facebook。 我正在使用fb_graph gem: https : //github.com/nov/fb_graph发布到Facebook。 我在Heroku上为这个应用程序运行omniauth-0.3.0。 创建用户时保存的令牌会在用户稍后登录时更改。 用于创建用户的代码 class SessionsController “Signed in!” end 用户模型是: def self.create_with_omniauth(auth) create! do |user| user.provider = auth[“provider”] user.uid = auth[“uid”] user.name = auth[“user_info”][“name”] user.token = auth[“credentials”][“token”] end end 我现在在大约30%的用户身上看到这个错误 – FbGraph::InvalidToken (OAuthException :: Error validating access token: Session does not match current stored session. This may be because the […]

gem install nokogiri -v’1.6.8.1’失败了

构建一个新的Rails应用程序并解决nokogiri的问题。 据说尝试gem install nokogiri -v ‘1.6.8.1’失败,输出如下。 我尝试删除Gemfile.lock并使用另一个没有问题的应用程序的Gemfile – bundle install仍然失败。 最初的失败是bundle install ,它继续在其他应用程序中工作。 从控制台: gem install nokogiri -v ‘1.6.8.1’ Building native extensions. This could take a while… ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. current directory: ~/.gem/ruby/2.3.1/gems/nokogiri-1.6.8.1/ext/nokogiri ~/.rubies/ruby-2.3.1/bin/ruby -r ./siteconf20161008-60071-tmqi2l.rb extconf.rb Ignoring byebug-6.0.2 because its extensions are not built. Try: gem […]

如何将Ruby升级到2.0

我的ruby版本是 ruby 1.9.3p374 (2013-01-15) [i386-mingw32] 我在安装了mingw的Windows 8下运行。 如何将其升级到ruby 2.0?

试图安装libv8,“无法构建gem原生扩展”

我使用的是W7 64bit。 简单地说,当我进入: C:\Sites>gem install libv8 我得到这个结果: Temporarily enhancing PATH to include DevKit… Building native extensions. This could take a while… ERROR: Error installing libv8: ERROR: Failed to build gem native extension. C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb creating Makefile which: no gmake in (“my PATH is here, and as far as I know it should include everything I […]

如何使用Ruby调用使用SSH和SCP传输文件?

我在usr/share/ruby.rb目录中有一个文件。 我想使用SSH和SCP使用Ruby调用将该文件传输到基于IP的远程设备。 谁能帮我?

你如何在轨道上应用补丁到ruby?

我想应用此线程中提到的action_mailer补丁,但我之前从未应用过补丁,我不确定这些是如何工作的: https : //rails.lighthouseapp.com/projects/8994/tickets/2263 我的动作邮件gem在这里:/opt/ruby-enterprise-1.8.6-20090421/lib/ruby/gems/1.8/gems/actionmailer-2.3.2 我假设我需要去那个目录并运行patch命令…这样的事情? cd /opt/ruby-enterprise-1.8.6-20090421/lib/ruby/gems/1.8/gems/ wget https://rails.lighthouseapp.com/attachments/108548/0001-Fix-implicit-multipart-mailer-views-when-RAILS_ROOT.patch patch < 0001-Fix-implicit-multipart-mailer-views-when-RAILS_ROOT.patch 我还不太清楚的一件事是补丁文件是指“actionmailer”目录,但我的名字叫做“actionmailer-2.3.2”