草庐IT

mysql - 我尝试安装 MySQL Community,但它总是安装 MySQL Commercial

全部标签

ruby-on-rails - 尝试创建新的 Rails 应用程序时出现 Thor 参数错误

我正在尝试使用rails-api创建一个新的应用程序。当我运行rails-apinewmynewapp时,我得到以下信息:/Users/sandy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1.1/lib/thor/parser/option.rb:125:in`validate_default_type!':Anoption'sdefaultmustmatchitstype.(ArgumentError)from/Users/sandy/.rbenv/versions/2.2.2/lib/ruby/gems/2.

ruby-on-rails - 私有(private) gem 没有安装在 docker 中

我正在尝试使用docker运行一个Rails应用程序。通过github的sshurl安装的gem很少,如下所示:Gemfilegem'swagger-docs',:git=>'git@github.com:xyz/swagger-docs.git',:branch=>'my_branch'我在docker中添加了keys,它能够克隆所需的repo并从git安装gem。DockerfileRUNmkdir-p/root/.sshCOPY./id_rsa/root/.ssh/id_rsaRUNchmod700/root/.ssh/id_rsaRUNssh-keygen-f/root/.ss

ruby - 为什么在 rvm 安装中有两个 rake gemspecs?

为什么在rvm安装中有两个rakegemspecs?~-10:59>find~/.rvm/-name'rake-0.8.7.gemspec'~/.rvm/gems/ruby-1.9.2-p136/specifications/rake-0.8.7.gemspec~/.rvm/gems/ruby-1.9.2-p136@global/specifications/rake-0.8.7.gemspec#alias~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/gems/1.9.1/specifications/rake-0.8.7.gemspec为什么不同?(非

使用时 Rubygems 2.0.14 不是线程安全的 bundle 程序安装消息 - RUBYGEMS VERSION : 2. 4.5.1

运行bundle安装时,我收到以下消息:Rubygems2.0.14isnotthreadsafe,soyourgemswillbeinstalledoneatatime.UpgradetoRubygems2.1.0orhighertoenableparallelgeminstallation.这很奇怪,因为在我的RubyGems环境中它说我的RubyGems版本是:2.4.5.1(见下文)~/w/Rafftopia❯❯❯gemenvRubyGemsEnvironment:-RUBYGEMSVERSION:2.4.5.1-RUBYVERSION:2.2.5(2016-04-26patc

ruby-on-rails - 本地 gem 的“bundle 安装”没有解决依赖关系,而 'gem install' 可以

我在目录“/home/enterprise/pkg”中有一个本地gem(enterprise-0.0.1.gem)。它依赖于active_directorygem(v1.5.5),这是在它的enterprise.gemspec文件中指定的,如下所示:-gem.add_dependency("active_directory")在我的应用程序的Gemfile中,我添加了以下行:-gem'enterprise','0.0.1',path=>'/home/enterprise/pkg'当我做的时候bundleinstall在我的应用程序的源目录中,只安装了企业gem。因此,我遇到了引用act

ruby-on-rails - 为 Ruby gem 创建安装生成器

我是构建Rubygems的新手,正在尝试我的第一个。我正在为我的gem编写一个生成器,它将在我的Rails应用程序中生成一个迁移。我希望将gem简单地包含在Rails应用程序中,运行“railsgmygem:install”以创建迁移,然后运行“rakedb:migrate”以完成所有操作。我已经找到了几种不同的方法来完成类似的任务,但到目前为止没有任何效果。我似乎无法让Rails应用程序找到生成器。我尝试过的最新指南位于此处:http://www.railsdispatch.com/posts/how-rails-3-enables-more-choices-part-1.这是我当前

ruby - 在我的 Mac 上安装 ruby​​ gem json 时遇到问题

我在尝试通过ruby​​gems安装json模块时收到此警告。有什么想法吗?Mac-Minipoulh$sudogeminstalljsonPassword:WARNING:File'/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/specifications/json-1.2.0.gemspec'doesnotevaluatetoagemspecificationBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errori

ruby - 无法安装任何 gem

我已经使用JavaScript和一些Erlang大约六个月了,最近我没有进行任何Rails编程。今天在我的新电脑上我去安装Rails但出现了这个错误:geminstallrailsWARNING:RubyGems1.2+indexnotfoundfor:http://gems.rubyforge.org/RubyGemswillreverttolegacyindexesdegradingperformance.BulkupdatingGemsourceindexfor:htp://gems.rubyforge.org/ERROR:Whileexecutinggem...(Gem::Re

ruby - Ruby 中的 "=="是否总是值相等?

抱歉,如果重复(我没找到)这只是为了确认Ruby的运算符==始终执行相等比较。IE。a==b将a的值与b的值进行比较,而不是像Java那样比较它们是否指向内存中的同一个对象(对于后者,在Ruby中,您应该使用a.object_id==b.object_id).因此,在Ruby中将字符串值与==进行比较是安全的(而在Java中这样做并不安全)谢谢编辑:问题在于任何Ruby对象的默认==行为,因为它会误导Java-C-C++程序员假设a==b比较引用本身,而不是引用内容。无论如何,你可以检查这段代码,使用字符串one="hello"two="he"two编辑2。所以,在Ruby中,比较a=

ruby - 在 Ubuntu 14.04 上使用 RVM 安装 Ruby 2.2.2 时出错

这是什么。我首先做了:rvmgetstablervminstallruby-2.2.2没有交易。它向我展示了以下内容:$rvminstallruby-2.2.2Searchingforbinaryrubies,thismighttakesometime.Nobinaryrubiesavailablefor:ubuntu/14.04/i386/ruby-2.2.2.Continuingwithcompilation.Pleaseread'rvmhelpmount'togetmoreinformationonbinaryrubies.Checkingrequirementsforubunt