草庐IT

PgSQL无法连接的问题

全部标签

ruby - 无法从 `sudo bundle install` 恢复

我错误地在我的项目上运行了sudobundleinstall,现在当我以自己的身份运行它时bundleinstall我得到了权限被拒绝的错误(如下)。我在这里尝试了说明https://github.com/bundler/bundler/blob/master/ISSUES.md#other-problems,还尝试将我的项目克隆到一个新目录并从那里运行bundle,但没有用。请帮忙!error:cannotopen.git/FETCH_HEAD:PermissiondeniedRetryinggitfetch--force--quiet--tags"/home/akonsu/.bun

ruby - Heroku 应用程序无法启动 - `require' : no such file to load -- sinatratestapp (LoadError)

我正在尝试使用bamboo-mri-1.9.2堆栈运行我的Heroku应用程序。当然,它在Ruby1.9.2上本地运行良好。但是在生产环境中,它在执行config.ru的启动过程中崩溃,如下所示:require'sinatratestapp'runSinatra::Application我的.gems文件:sinatra--version'>=1.0'应用程序本身为sinatratestapp.rb:require'rubygems'require'sinatra'get'/'do"HellofromSinatraonHeroku!"end这就是我在项目中得到的所有内容,并尝试在Her

ruby - 为什么 Net::FTP 无法连接到服务器?

我正在尝试创建一个脚本来使用Ruby从FTP服务器列出和下载数据。我是Ruby的新手,所以我查找了如何使用Net::FTP的文档。我无法理解为什么这不起作用:require'net/ftp'server="ftp.server.com"user="myuser"password="mypassword"Net::FTP.open(server,user,password)do|ftp|files=ftp.chdir('mydirectory/')files=ftp.listputs"listoutofdirectory:"putsfilesend那行不通,返回这个错误:/home/ad

ruby - 无法解决 Ruby 错误(缺少心理)

每当我在我的服务器上使用Ruby运行某些东西时,我都会收到以下错误:/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in`':Itseemsyourrubyinstallationismissingpsych(forYAMLoutput).Toeliminatethiswarning,pleaseinstalllibyamlandreinstallyourruby.我使用RVM在我的VPS上安装了Ruby。我已尝试按照StackOverflow上其他问题中的说明安装软件包libyaml,但无济于事。我不确定

ruby - 为什么我无法确定我的 ruby​​ 安装版本?

当我运行ruby-version时,我得到:ruby1.8.7(2012-02-08patchlevel358)[universal-darwin11.0]-e:1:undefinedlocalvariableormethod`rsion'formain:Object(NameError)有什么问题吗? 最佳答案 使用ruby​​-v或ruby​​--version。它正在将-version解析为rsion。这两个都行。计算破折号的数量:ruby-vruby--version当您提供带有“version”的单个破折号时,Ruby会看

ruby - 无法找到 `AFNetworking (~> 2.1.0)` 的规范

我在做一个ruby​​motion项目在安装的rake文件、gem文件和bundle中需要afmotion。当我尝试运行rakepod:install时出现上述错误。有什么想法吗?提前致谢。 最佳答案 确保安装了cocoapodsgem,然后运行pod设置如果由于某种原因不能解决问题,请使用完全删除cocoapods目录rm-rf~/.cocoapods并再次尝试podsetup。 关于ruby-无法找到`AFNetworking(~>2.1.0)`的规范,我们在StackOverflo

Ruby gem rmagick 无法安装在 Mac OS X 上

我知道这个问题很早就被问过了,但是没有一个解决方案对我有用,我现在真的很绝望。我正在尝试让rMagick使用gem安装diaspora。我已经通过自制软件安装了imagick,当我尝试运行geminstallrmagick时,我收到了这个错误:ERROR:Errorinstallingrmagick:ERROR:Failedtobuildgemnativeextension./Users/tobischweiger/.rvm/rubies/ruby-1.9.3-p385/bin/rubyextconf.rbcheckingforRubyversion>=1.8.5...yescheck

ruby - High Sierra 中的 cocoapods 权限问题?

我将我的macOS更新为HighSierra,现在通过cocoapods在我的iOS应用程序中安装依赖项。但是我遇到以下错误。XXXXXXXXX:MyProjectCompanyName$podupdate-bash:/usr/local/bin/pod:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby:badinterpreter:Nosuchfileordirectory我试过了Zubair-mac-mini:~sdsol$geminstallcocoapodsERROR:Whileexecuti

ruby - 使用 bundle exec 可以解决这个问题吗?

这是我的Gemfilesource:rubygemsgem'rake','0.9.2.2'gem'sinatra'gem'activerecord','3.0.9'gem'pg','~>0.12.2'gem'logger'gem'nokogiri'group:development,:testdogem'rack-test'gem'ruby-debug19'gem'sqlite3'end我运行在其他项目中工作的rakeconsole,现在我收到这条消息:您已经激活了activesupport3.1.3,但是您的Gemfile需要activesupport3.0.9。使用bundleex

ruby-on-rails - Ruby/Rails 神秘的 "undefined constant"问题

我有一个Rails项目,其中一个常量在处理请求时在某个时刻被破坏。我正在使用mime/types和restclientgem。restclient模块定义了MIME的扩展,其中包含type_for_extension方法。moduleRestClient...defstringify_headersheadersresult[key]=target_values.map{|ext|MIME::Types.type_for_extension(ext.to_s.strip)}.join(',')...endendendmoduleMIMEclassTypesdeftype_for_ext