草庐IT

ruby-on-rails - 安装pg(0.19.0)时出错,Bundler无法继续

昨天我安装了Ubuntu16.04.1。ruby2.3.1p112(2016-04-26修订版54768)[x86_64-linux]rails-v'4.2.6'创建一个Rails项目运行bundle出现错误:Errno::EACCES:Permissiondenied@rb_sysopen-/home/zeus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/.gemtestAnerroroccurredwhileinstallingpg(0.19.0),andBundlercannotcontinue.Makesur

ruby - 安装 osx mavricsmavrics 的 ruby​​ 1.9.3

我正在尝试在我的osx10.9操作系统上安装ruby​​1.9.3,但我不断收到以下错误:Errorrunning'requirements_osx_port_update_systemruby-1.9.3-p448',pleaseread/Users/ramesh/.rvm/log/1383430694_ruby-1.9.3-p448/update_system.logRequirementsinstallationfailedwithstatus:1.我正在使用以下命令进行安装:rvminstall1.9.3完整日志如下:checkingforTclconfiguration...

ruby-on-rails - 我在 rails generate devise :install 之前运行了 rails generate devise MODEL

我在运行初始Devise生成器之前不小心添加了我的Devise模型。我先运行的代码:$railsgeneratedeviseMODEL初始设计生成器(我应该先运行的):$railsgeneratedevise:install我现在有一个名为Model的设计Controller,它不允许我运行“rakedb:migrate”错误:rakeaborted!Userdoesnotrespondto'devise'method.Thisusuallymeansyouhaven'tloadedyourORMfileorit'sbeingloadedtoolate.Tofixit,besureto

ruby - Bundler::GemfileNotFound 每当我尝试运行 bundle install

我正在使用kali-linux(Linux发行版女巫是Back-Track的延续,基于Ubuntu,只是现在基于Debianwheezy)进行一些渗透测试。一切正常,直到我决定更新我的系统工具。现在,每当我尝试运行基于ruby​​的工具时,它都会给我带来麻烦:Couldnotfindgem'ruby-progressbar(>=1.1.0)ruby'inthegemsavailableonthismachine.Run`bundleinstall`toinstallmissinggems.我继续运行bundleinstall但随后出现了Bundler::GemfileNotFound错

ruby - 在 Mac OS X 上安装 Homebrew 无法连接到 raw.githubusercontent.com 端口 443

当我尝试安装Homebrew时,出现以下连接被拒绝错误。请帮我解决这个问题。$ruby-e"$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"curl:(7)Failedtoconnecttoraw.githubusercontent.comport443:Connectionrefused 最佳答案 适合我。除非它是github的真正问题,它可能是但我猜它不是,它可能是您的连接问题。您可以通过浏览器访问相同的URL吗?http

ruby-on-rails - 从设计 "User does not respond to ' 设计方法中获取错误“运行 "rails generate devise:install"时

当运行“railsgeneratedevise:install”时,我从设计中收到错误“用户不响应‘设计’方法”。想法重新如何解决?事实上,当我尝试运行“railsgeneratedevise:install”时,我也注意到了这个错误。注意事项:Gregs-MacBook-Pro:testappgreg$railsgeneratedevise:install/Library/Ruby/Gems/1.8/gems/devise-2.0.1/lib/devise/rails/routes.rb:406:in`raise_no_devise_method_error!':Userdoesno

ruby-on-rails - Node/NPM 依赖于 Ruby on Rails 引擎 gem Assets 管道

我正在构建一个打包在gem中的RubyonRails引擎,但无法弄清楚如何确保加载NPM依赖项。在常规Rails应用程序中,您可以安装NPM,然后使用npminstall命令将包放入node_modules基本目录中。然后在您的application.rb中使用以下行将node_modules添加到Assets管道:config.assets.paths但是,就我而言,我正在构建一个Rails引擎以作为gem加载。.gemspec文件允许您的gem将其他Ruby依赖项加载到主机应用程序中,但我不知道如何对Node依赖项执行相同的操作。在我的引擎中注意它需要某些NPM模块才能工作以便它们

ruby - 如何在 ruby 中使用钩子(Hook)

我有一个gem,它需要在安装gem后执行一些rake任务。使用http://blog.costan.us/2008/11/post-install-post-update-scripts-for.html中描述的方法在安装后执行代码有一种骇人听闻的方式。.但是Gem类现在有钩子(Hook),其中之一是post_install钩子(Hook)。我正在尝试添加一行Gem.post_install{puts'posthookexample'}进入Rakefile并且它似乎没有在安装过程中执行。这条线应该放在哪里才能注册钩子(Hook)? 最佳答案

ruby-on-rails - Capistrano bundler :install fails

我正在尝试使用Capistrano3.0将我的Rails应用程序部署到EC2实例中。我现在在运行“capproductiondeploy”或“capproductionbundler:install”时出现以下输出。DEBUG[5b379979]Running/usr/bin/enviftest!-d/var/www/app/current;thenecho"Directorydoesnotexist'/var/www/app/current'"1>&2;false;fionec2-75-101-200-185.compute-1.amazonaws.comDEBUG[5b379979

Ruby Guard 问题 - 'Please install the sqlite3 adapter' - railstutorial.org

我正在关注RubyonRailsTutorial并且在测试部分变得有些困惑,特别是-3.6.2-AutomatedtestswithGuard按照部署到Heroku的教程说明,我已切换到Postgresql并从我的gemfile中删除了sqlite3,并进行了捆绑安装以进行更新。但是,一旦我运行bundleexecguard我收到消息:/Users/username/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.3/lib/bundler/rubygems_integration.rb:147:inblockinreplace_ge