rubygems

How to get the list of all engines in Rails 3 app

落花浮王杯 提交于 2019-12-20 23:32:00
问题 According to Rails engines extending functionality in Rails 2.x one could do Rails::Initializer.new(Rails.configuration).plugin_loader.engines This code is not working in Rails 3 ActionController::RoutingError (undefined method `new' for Rails::Initializer:Module): config/application.rb:12:in `require_or_load' What do I need to do in Rails 3 to get such list of engines? This is needed for Extending controllers of a Rails 3 Engine in the main app 回答1: As of 5/10/2011 and Rails 3.1 beta, it's

How to get the list of all engines in Rails 3 app

蓝咒 提交于 2019-12-20 23:30:05
问题 According to Rails engines extending functionality in Rails 2.x one could do Rails::Initializer.new(Rails.configuration).plugin_loader.engines This code is not working in Rails 3 ActionController::RoutingError (undefined method `new' for Rails::Initializer:Module): config/application.rb:12:in `require_or_load' What do I need to do in Rails 3 to get such list of engines? This is needed for Extending controllers of a Rails 3 Engine in the main app 回答1: As of 5/10/2011 and Rails 3.1 beta, it's

Failure to install old mysql2 gem

痞子三分冷 提交于 2019-12-20 20:27:34
问题 I am using Mac High Sierra. I am using Ruby 2.2.1 with RVM. I need to use mysql2 with this Ruby on Rails app. I do have mysql 5.7 installed. I do have xcode installed along with the command-line tools. I am simply trying to get this company app working on my local machine. I know that I am very close but I have one final error when I do bundle install I receive the following error when I get to the mysql2 gem: Fetching mysql2 0.3.18 Installing mysql2 0.3.18 with native extensions Gem::Ext:

Can't install Rmagick and Imagemagick on Windows 7

℡╲_俬逩灬. 提交于 2019-12-20 20:01:40
问题 when I run gem install rmagick-2.13.1.gem from the directory in which rmagick-2.13.1.gem is I get an Error saying that it failed to build gem native extension, below which it says c:/Ruby192/bin/ruby.exe extconf.rb checking for Ruby version >= 1.8.5 ... yes Unable to get Imagemagick version ***extconf.rb failed*** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. From what I know reading the answers to

Trying to use rspec, but getting an error that rspec-core 2.2.1 has been activated, but my Gemfile requires rspec-core 2.1.0

爷,独闯天下 提交于 2019-12-20 19:34:45
问题 I've update my gems. I've created a sample Rails app and have the following in my Gemfile: source 'http://rubygems.org' gem 'rails', '3.0.3' gem 'sqlite3-ruby', :require => 'sqlite3' group :development do gem 'rspec-rails' end group :test do gem 'rspec' gem 'webrat', '0.7.1' end However, when I run 'rspec spec/', I get the following message: /home/jeff/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:27:in `block in setup': You have already activated rspec-core 2.2.1, but

libxml-ruby: Failed to build gem native extension

被刻印的时光 ゝ 提交于 2019-12-20 18:31:56
问题 I'm trying to install libxml-ruby . I have installed libxml2 , libxslt and coreutils I have also read other posts regarding the issue but none solved it for me. brew list libxslt /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/bin/xslt-config /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/bin/xsltproc /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/include/libexslt/ (3 files) /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/include/libxslt/ (21 files) /opt/boxen/homebrew/Cellar/libxslt/1.1.28_1/lib/libexslt

Attempting to install libv8, “failed to build gem native extension”

谁说我不能喝 提交于 2019-12-20 12:22:08
问题 I am using W7 64bit. Simply put, when I enter: C:\Sites>gem install libv8 I get this result: 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 need") /usr/bin/env: python: No such file or directory C:

No source for ruby-2.0.0-p451 provided with debugger-ruby_core_source gem

核能气质少年 提交于 2019-12-20 11:41:28
问题 I've seen very similar problems in other SO questions (e.g. No source for ruby-1.9.2-p321 provided with debugger-ruby_core_source gem) as well as through a Google search, but none of those have helped so far. I'm using OSX Mavericks (first time mac user) and rbenv (first time using that too). I've git cloned a Rails project which I've previously ran on another laptop (Ubuntu & rvm) fine. rbenv version : 2.0.0-p451 (which I manually installed) When I try to bundle install , I get the following

Fix therubyracer/libv8 (0.12.1) installation on Mavericks

白昼怎懂夜的黑 提交于 2019-12-20 11:13:54
问题 OK, I’m at the end of my tether with this. There are a few similar questions but they all refer to therubyracer 0.10, and they mostly conclude that the problem can be fixed by upgrading to 0.12. I’m having similar problems, but when I use 0.12. Similar questions Installing libv8 gem on Mavericks How to fix libv8 error from Gemfile on Mavericks? I’m having problems using ‘standard’ (xcode?) gcc, and both apple-gcc42 and gcc from homebrew. I’ve tried both --with-system-v8 and --without-system

Understanding Gemfile.lock: Is it okay to delete Gemfile.lock then run bundle install again?

☆樱花仙子☆ 提交于 2019-12-20 11:09:19
问题 We would test this, but don't want to risk ruining our dev environment if this isn't supposed to happen. Is it okay to delete Gemfile.lock? We're on Rails 3.0.6. 回答1: You're probably not going to ruin your dev environment. However, you might end up with newer versions of gems than you had before. It depends on how you have defined them in Gemfile . If you're using entries like: gem "rails" Then you'll get the latest rails gem, whatever that might be. If you're using entries like: gem "rails",