Tag: gem

如何安装一个特定版本的ruby?

使用命令行gem工具,如何安装特定版本的gem?

启动Rails服务器时出错:未定义的方法'configure'

我是新来的铁轨和哈特尔的教程工作 。 一切都很好,直到我试图做第二次教程,并创build另一个项目,试图使用最新版本的铁轨。 当我尝试从应用程序文件夹中加载rails server ,出现以下错误。 $ rails s => Booting WEBrick => Rails 4.0.4 application starting in development on => Run `rails server -h` for more startup options => Ctrl-C to shutdown server Exiting /Users/sierra/Desktop/sample_app_2/config/environments/development.rb:1:in `<top (required)>': undefined method `configure' for #<SampleApp2::Application:0x00000101a74610> (NoMethodError) 我的Gemfile直接来自Hartl教程: source 'https://rubygems.org' ruby '2.1.0' #ruby-gemset=railstutorial_rails_4_0 gem 'rails', '4.0.4' group :development, […]

“gem install therubyracer -v'0.10.2'”在osx小牛没有安装

试图安装therubyracer在特拉华使用“gem install therubyracer -v'0.10.2'”但我得到以下错误: /Users/dennischen/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for main() in -lobjc… yes creating Makefile make compiling rr.cpp clang: warning: argument unused during compilation: '-rdynamic' rr.cpp:48:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ 1 warning generated. compiling v8.cpp clang: warning: argument unused during compilation: '-rdynamic' compiling v8_array.cpp clang: warning: argument unused during compilation: […]

在PATH模式040777中获取警告“不安全的世界可写dir / home / chance”,用于rails和gem

我试过这个,但它没有工作,似乎是为OSX。 我有一个新的Ubuntu 10.10与rvm,rails 3和ruby1.9.2安装。 我有一个新的导轨应用程序,但使用gem或导轨导致以下警告(滞后)。 $ rails -v /home/chance/.rvm/gems/ruby-1.9.2-p180@global/gems/railties-3.0.5/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /home/chance in PATH, mode 040777 /home/chance/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.0.10/lib/bundler/runtime.rb:136: warning: Insecure world writable dir /home/chance in PATH, mode 040777 Rails 3.0.5 $ gem -v /home/chance/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4: warning: Insecure world writable dir /home/chance in PATH, mode 040777 1.6.2 只要事情重要,这里是我的Gemfile: source 'http://rubygems.org' gem 'rails' # Bundle edge […]

彩色ruby输出

是否有一个gem执行背景和前景文本着色terminal输出? 我记得,在编程Pascal时,我们都习惯使用textcolor(…)程序来使我们的小型教育程序看起来更漂亮,更具有performance力。 Ruby中有类似的东西吗?

在Windows 7上安装Ruby MYSQL2 gem安装

我试图在Windows 7上安装mysql2 gem我从mysql网站下载了连接器,并将libmysql.dll放在ruby200 \ bin 然后做gem安装mysql2 这些是我在这里昏迷的结果? Temporarily enhancing PATH to include DevKit… Building native extensions. This could take a while… ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. C:/Ruby200/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()… yes checking for rb_wait_for_single_fd()… yes checking for rb_hash_dup()… yes checking for rb_intern3()… yes *** extconf.rb failed *** Could […]

不可能在Mavericks上安装PG gem

我正在尝试安装pg gem,以便再次使用我的rails项目。 但是我得到这个错误: 构build本机扩展。 这可能需要一段时间…错误:错误安装pg:错误:无法构buildgem本机扩展。 /Users/jeanosorio/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb checking for pg_config… no No pg_config… trying anyway. If build立失败,请再次尝试–with-pg-config = / path / to / pg_config检查libpq-fe.h … no找不到'libpq-fe.h头文件* extconf.rb失败*由于某种原因无法创buildMakefile,可能缺less必要的库和/或头文件。 检查mkmf.log文件以获取更多详细信息。 您可能需要configuration选项。 提供的configuration选项:–with-opt-dir –without-opt-dir –with-opt-include –without-opt-include = $ {opt-dir} / include –with-opt-lib – without-opt-lib = $ {opt-dir} / lib –with-make-prog –without-make-prog –srcdir =。 –curdir –ruby = / Users […]

在OS X上安装PG gem – 无法构build原生扩展

看来很多人在安装pg gem时遇到了问题。 没有任何其他解决scheme为我工作。 我试图安装pg gem和postgres.app。 PGgem将不会安装。 我得到的第一个错误是: 安装pg(0.17.0)时发生错误,并且Bundler无法继续。 确保在捆绑之前gem install pg -v '0.17.0'成功。 有关将我的gem install指向pgconfiguration的安装build议失败,并显示以下错误消息(本论坛中的许多其他人遇到此问题): Failed to build native extensions… Results logged to /Users/melanie/.rvm/gems/ruby-1.9.3-p448/gems/pg-0.17.0/ext/gem_make.out 我不知道如何查找或访问这个日志文件来寻找更多的线索。 我尝试使用sudo apt-get install命令时也收到错误消息(找不到命令)。 我已经search了这个论坛最近6个小时,尝试每一个build议,让我的铁路项目工作。 我无法find有关如何更改path的build议,或者具体而言,需要进行哪些更改。 我which pg_config返回一个文件源。 我用一个命令来使用该configuration来安装pg。 它失败。 有这么多的人有这个麻烦。 许多答案build议自制。 我不得不删除,因为它抛出了其他问题。

无法安装gem – 无法构buildgem本机扩展 – 无法加载此类文件 – mkmf(LoadError)

Ruby 1.9.3 Gemfile的一部分 #…………… gem "pony" gem "bcrypt-ruby", :require => "bcrypt" gem "nokogiri" #……………… 当我试图安装gem,我得到一个错误 alex@ubuntu:~/$ bundle Fetching gem metadata from http://rubygems.org/……… Fetching gem metadata from http://rubygems.org/.. Enter your password to install the bundled RubyGems to your system: #####…………………………………………………… Installing bcrypt-ruby (3.0.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb […]

bundle安装失败,SSL证书validation错误

当我在Centos 5.5上运行我的Rails 3项目的bundle install ,会失败并显示错误: Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://bb-m.rubygems.org/gems/multi_json-1.3.2.gem) An error occured while installing multi_json (1.3.2), and Bundler cannot continue. Make sure that `gem install multi_json -v '1.3.2'` succeeds before bundling. 当我尝试手动安装gem(通过gem install multi_json -v '1.3.2' )它工作。 其他几个gem也会出现同样的问题。 我使用RVM(1.12.3),ruby 1.9.2,bundler 1.1.3。 如何解决它?