rubygems

mysql ruby gem not installing on Windows 7

天大地大妈咪最大 提交于 2019-12-11 02:39:37
问题 Not a duplicate. This question is mysql gem and the other question is mysql2 gem. They do have the same answer though, but the other question's answer doesn't tell what the solution is explicitly. The answer is hidden in the comments. See yellow text of the answer for this question contains the solution. Below is an error I'm receiving when trying to install the mysql gem on Windows. C:\>gem install mysql Temporarily enhancing PATH to include DevKit... Building native extensions. This could

How to put a group of <p> inside a <div>

可紊 提交于 2019-12-11 02:35:52
问题 I'd like to figure out a way to get to the HTML result (mentioned further below) by using the following Ruby code and Nokogiri: require 'rubygems' require 'nokogiri' value = Nokogiri::HTML.parse(<<-HTML_END) "<html> <body> <p id='1'>A</p> <p id='2'>B</p> <h1>Bla</h1> <p id='3'>C</p> <p id='4'>D</p> <p id='5'>E</p> </body> </html>" HTML_END # The selected-array is given by the application. # It consists of a sorted array with all ids of # <p> that need to be enclosed by the <div> selected = [

Rails 5 “gemify” assets manifest file

谁都会走 提交于 2019-12-11 01:44:41
问题 Update Got this in a working state. Gem can be found here: https://github.com/jakehockey10/popcircle Original post: I am trying to "gemify" a jquery plugin as a learning experience. The plugin I'm using also depends on jquery.easing , so in the gem's vendor/assets/javascripts folder, I have both jquery.easing.js as well as the other jquery plugin. Here is what my gem's <name_of_gem>.rb file looks like: require '<name_of_gem>/version' module <NameOfGem> class Engine < ::Rails::Engine class

Thrift gem and JRuby

半世苍凉 提交于 2019-12-11 01:28:05
问题 I just recently installed JRuby and the Thrift gem after using it in MRI. I'm running into a problem where if I require 'thrift' I get the message "Unable to load thrift_native extension. Defaulting to pure Ruby libraries." If I then try and require the code thrift generated in ruby I'll get this error: "NameError: uninitialized constant Thrift::Struct_Union" Is the thrift gem currently not working with JRuby? Is there something I can do to use thrift with JRuby besides using the gem? EDIT:

Rails Gemfile: use one line in development, another in production

a 夏天 提交于 2019-12-11 00:37:29
问题 We run Unicorn on Heroku in production but use Webrick in development on a local machine. We are unable to install Unicorn on the local machine. Is it possible to have Rails load the Unicorn gem only in production? Right now, our solution is to comment out the Unicorn gem when running the app locally and uncomment the gem when pushing to Heroku. We're on Rails 3.2.12. Gemfile: source 'http://rubygems.org' gem 'rails', '3.2.12' gem 'jquery-rails' # # ===========================================

bundle install using old rubygems version

不打扰是莪最后的温柔 提交于 2019-12-11 00:09:34
问题 I'm having what appears to be the exact same problem seen in a 1-month old question that no one has touched. I installed rbenv using homebrew, installed ruby 2.3.1 using rbenv install 2.3.1 , installed jekyll and bundler using gem install jekyll and gem install bundler , then within a jekyll project, I typed bundle install . I got the error Rubygems 2.0.14.1 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation

Bundler using old version

天涯浪子 提交于 2019-12-11 00:05:51
问题 I am using Bundler for my Rails application. When I list installed bundler gems it lists 1.4.0.pre.1 and 1.3.15 and running bundler -v yields 1.4.0.pre.1 (which is what i want). However, when I try to run my application it says current bundler version is 1.0.15 . This version is not installed as a gem and I cannot figure out how to remove it ( gem uninstall bundler -v 1.0.15 wont work since this version is not installed as a gem). I have tried updating and installing new versions, but nothing

Rails Error - `require': no such file to load — rubygems (LoadError)

十年热恋 提交于 2019-12-10 23:31:54
问题 I recently followed some instructions with RVM to install ruby-debug and I think it might have caused some problems. The link that I found the instructions are here: http://beginrescueend.com/support/troubleshooting/ The commands I used to install are the following: $ rvm reinstall 1.9.3 --patch debug --force-autoconf $ gem install ruby-debug19 -- --with-ruby-include="${MY_RUBY_HOME/rubies/src}" Now, when I try to start the rails server, I receive the following error: ./bundler_stubs/rails:13

How to pass selected value from dropdown and access it as a parameter for cascading dropdowns in rails

a 夏天 提交于 2019-12-10 22:15:07
问题 Edited: I am trying to achieve cascading dropdown. In my 1st dropdown, I get all the distinct Names. <%= f.input :names, collection: names.distinctnames, :label => "Select Name" %> On selecting the name, how to access the value and pass it to controller/model so that I can filter based on the values and bind it to the next dropdown. In my Model, I have the following scope scope :distinctnames, ->{ Names.distinct.pluck(:names)} Here, I want to add another scope that gives the cities for the

Bundler how to require gems separately in Gemfile just in one file?

断了今生、忘了曾经 提交于 2019-12-10 21:51:25
问题 I have a conflict between rspec and mocha (rspec is not using mocha but other minitest tests are). If I put mocha in my gemfile (even with require: false) it gets loaded by activesupport/test_case.rb:15 silence_warnings { require 'mocha/setup' } which then causes rspec to barf. So, I'd like to just require it in my test_setup file from my system gems but I can't figure out how to load a gem outside of bundler. Other ideas on how to get these gems to play nice are welcome. 回答1: You can use