rubygems

Why is bundle installing the wrong version for bigdecimal using 1.2.0?

亡梦爱人 提交于 2019-12-10 11:58:10
问题 I'm using Bundle to install gems in d:/cucumbertests/cucumber/ successfully, which installs BigDecimal v 1.1.0. This failed in d:/cucumbertests/cucumber/itinfix which installed BigDecimal v 1.2.0. How do I identify the correct version of BigDecimal in my Gemfile in d:/cucumbertests/cucumber/itinfix ? Why is the version of BigDecimal correct in d:/cucumbertests/cucumber ? The latest version is 1.2.0, found by running gem query --remote --name-matches bigdecimal is: REMOTE GEMS: bigdecimal (1.2

Rails - how to use a plugin from github (how to install, utilize, etc)

妖精的绣舞 提交于 2019-12-10 11:05:59
问题 I'm trying to install a couple of different plugins for my rails 3 app. I cd to '/vendor/plugins/', then type git clone the_git_src_url . I see the files in the /vendor/plugins/ directory. However when I try to use any of the tags provided by the plugin I get uninitialized constant ContentsController::HTMLToTextileParser PriceTag and html2textile are the two plugins I'm trying to use. This is what triggers the error above: <%= PriceTag.html_to_textile(@content.desc) %> I'm working in

JRuby/Windows and (native) extensions how do I distinguish them?

巧了我就是萌 提交于 2019-12-10 10:16:53
问题 I've tried to use EventMachine etc., with JRuby. I get errors about native extensions. I believe this is due to Java limitations. I think the fact that I am on Windows further complicates the issue. Some clarification would be appreciated. What extensions can/can't be used with JRuby? How can I tell? Thanks. 回答1: there is no really easy way to use native extensions in jruby. native extensions are calling c code that cant be called in jruby without implementing it in java. aside from that a

Should I add files that are part of the Ruby Standard Library to the `Gemfile`?

两盒软妹~` 提交于 2019-12-10 10:15:36
问题 I need to do require 'openssl' in my code. Otherwise, I get NameError: uninitialized constant Object::OpenSSL . But, when I do gem list , I don't see openssl . I'm deploying a Sinatra app to Heroku stack bamboo-mri-1.9.2. Should I add openssl to the Gemfile ? I don't think so because I think openssl is part of the Ruby Standard Library. Also, what about base64? 回答1: It's very likely that you have compiled ruby without openssl support. If you are using RVM, you can try this 来源: https:/

Rails 3, what's the best act as tree behavior?

眉间皱痕 提交于 2019-12-10 09:54:14
问题 So I'm looking for a gem that will bring some tree behavior to the pages model. From what I can see there are quite a few, I was wondering what other people thought. If there any great ones or and dodgy ones to avoid. Cheers. 回答1: Take a look at Ancestry, it's remarkably efficient. 回答2: I recommend Closure Tree. His author introduces good resources and reasons for it here. 回答3: check out here https://www.ruby-toolbox.com/categories/Active_Record_Nesting I prefer awesome_nested_set 回答4: Seems

Error installing Mysql2 gem- 10.6 Server

不问归期 提交于 2019-12-10 09:35:38
问题 I'm trying to install the mysql2 gem on 10.6 server and I get an error message I haven't seen: EBuilding native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb checking for rb_thread_blocking_region()... no checking for mysql.h... no checking for mysql/mysql.h... no ----- mysql.h is missing. please check your installation of mysql and try again. --

Unable to download data from rubygems

孤人 提交于 2019-12-10 09:32:02
问题 I don't know what this error means when trying to run gem update --system ; {9:29}[2.2.3]~ ➭ gem update --system ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) I also get a similar error when trying; {9:30}[2.2.3]~ ➭ gem install tunnelss ERROR: Could not find a valid gem 'tunnelss' (>= 0), here is why: Unable to download data from https:/

How to get Rails Heroku log backtrace from Heroku error

大城市里の小女人 提交于 2019-12-10 08:23:05
问题 I using rails 3.2.3 on Heroku Bamboo stack. I got this error last night from my logs but can't diagnose exactly where and why its occurring. How can I get the entire backtrace of the error from my heroku logs? app[web.2]: !! Unexpected error while processing request: can't modify frozen array heroku[router]: Error H13 (Connection closed without response) -> GET 回答1: This isn't a direct answer to your question, since as far as I know you cannot get the backgrace from the log file. you get what

How to use amistad gem in rails3?

本小妞迷上赌 提交于 2019-12-10 08:05:02
问题 I need help on how to implement AMISTAD gem in a rails3 application. Please suggest some tutorials or views? I saw github amistad link. but i want a full coverage on this gem. Please help me. 回答1: The gem creator kindly send me an example of how to use the GEM try these, create a friendship controller that handles the methods class FriendshipsController < ApplicationController before_filter :authenticate_user! def index @friends = current_user.friends @pending_invited_by = current_user

Bundle install fails to install libxml-ruby

喜欢而已 提交于 2019-12-10 05:31:19
问题 I'm a new to Ruby world and I need to clone an existing project. The instructions are: source .env.development bundle install But it fails with: Using libv8 3.16.14.15 Fetching libxml-ruby 2.9.0 Installing libxml-ruby 2.9.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/vlad/.rvm/gems/ruby-2.3.1/gems/libxml-ruby-2.9.0/ext/libxml /Users/vlad/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20181109-46682-fvgifh.rb extconf.rb -