rubygems

Gem dependency conflict between coffee-rails and rspec-rails

随声附和 提交于 2020-01-06 04:12:04
问题 I'm upgrading an app from rails 3.1.1 to rails 3.2. I had to update version of coffee-rails as well as rspec-rails to their latest versions to work with rails 3.2. However, they both seem to be incompatible with each other. When I run the bunder I get In Gemfile: coffee-rails (~> 3.2.2) ruby depends on actionpack (= 3.2.0) ruby rspec-rails (~> 2.8.1) ruby depends on actionpack (3.0.0) However, on rubygems for rspec-rails, it clearly specifies the dependency to be >= actionpack (3.0.0) Has

error with pry- warning: already initialized constant previous definition of DEFAULT_HOOKS was here

喜欢而已 提交于 2020-01-05 12:19:21
问题 I have used pry in the terminal all year long without any problem. But starting last night, every time I type pry in the terminal, it doesn't open and instead gives me a long log of errors. I tried several things and spent a lot of time searching but I am at lost and don't know what to do next. I don't understand why it gives me some line numbers of a ruby file with the different errors since it usually work without being related to a file. The log is a bit long, but the errors get repeated.

error with pry- warning: already initialized constant previous definition of DEFAULT_HOOKS was here

*爱你&永不变心* 提交于 2020-01-05 12:17:33
问题 I have used pry in the terminal all year long without any problem. But starting last night, every time I type pry in the terminal, it doesn't open and instead gives me a long log of errors. I tried several things and spent a lot of time searching but I am at lost and don't know what to do next. I don't understand why it gives me some line numbers of a ruby file with the different errors since it usually work without being related to a file. The log is a bit long, but the errors get repeated.

Alternative to 'ruby-debug19' (culprit 'linecache19') on ruby 2.0.0p247?

邮差的信 提交于 2020-01-05 08:29:59
问题 I am frustrated because I have tried other StackOverflow articles on this issue, but have been unsuccessful in fixing my own error. When I call 'gem install linecache19' ...the following error is outputed ERROR: Error installing linecache19: ERROR: Failed to build gem native extension. /home/user/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb checking for vm_core.h... no /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:in `create_makefile_with_core'

“sqlite3 not found” error in ruby on rails

杀马特。学长 韩版系。学妹 提交于 2020-01-05 08:25:17
问题 I am very new to RoR... I installed Ruby and installed its gems... then downloaded and installed MySql... created my first directory demo. then started the server using ruby script/server entered the http://localhost:3000 url in the browser and get a "welcome aboard" page..all is well till now... now I create a controller using ruby script/generate controller Say the controller is created and it looks like this class SayController < ApplicationController def hello end end I then create a view

Rails failing and strange bundle installations

蓝咒 提交于 2020-01-05 07:53:05
问题 There's one thing that I can't figure out. When I try to run rails it says something like: Could not find sprockets-2.1.2 in any of the sources Run `bundle install` to install missing gems. By the way sprockets-2.1.2 is installed. (I've run bundle install successfully) But as far as I understand when I run rails the global bin is being run and so my local gems installed by bundler are not accessible by it. Can I solve this somehow without having to manually install a lot of gems like: gem

Why does bundler think it needs a specific version when the gemspec specifies a pessimistic constraint?

本小妞迷上赌 提交于 2020-01-05 07:46:22
问题 My gemspec clearly requires active_support ~> 3.0 , but bundler is failing to bundle install saying that my gem requires active_support = 3.0 . WTF bundler? Can anyone explain this? $ gem install code_filter Successfully installed activesupport-3.0.0 Successfully installed active_support-3.0.0 Successfully installed code_filter-0.1.1 $ gem dependency code_filter Gem code_filter-0.1.1 active_support (~> 3.0, runtime) $ bundle Fetching gem metadata from http://rubygems.org/....... Fetching gem

Warning: the lockfile is being updated to Bundler 2, after which you will be unable to return to Bundler 1

烈酒焚心 提交于 2020-01-05 07:12:10
问题 I put some new gems in my Gemfile and ran bundle install . The installation went successfully, but at the end I got this warning: Warning: the lockfile is being updated to Bundler 2, after which you will be unable to return to Bundler 1. What does this mean - I mean it obviously states that the lockfile is being updated to Bundler2 and I wont be able to return to Bundler 1, and yet, should I be concerned about this? Is there any danger of non-compatibility after this? Why is it updated

Issues with gem Rdmtx

守給你的承諾、 提交于 2020-01-05 05:36:08
问题 I'm facing the issue bellow when I try to install the Rdmtx gem: $ gem install Rdmtx Building native extensions. This could take a while... ERROR: Error installing Rdmtx: ERROR: Failed to build gem native extension. /Users/alberto/.rbenv/versions/2.2.5/bin/ruby -r ./siteconf20170508-97735-7c5328.rb extconf.rb checking for main() in -ldmtx... no creating Makefile make "DESTDIR=" clean make "DESTDIR=" compiling Rdmtx.c Rdmtx.c:26:10: fatal error: 'dmtx.h' file not found #include <dmtx.h> ^ 1

How to attach files to ruby hipchat messages?

徘徊边缘 提交于 2020-01-05 03:44:19
问题 I want to send text files through hipchat using the ruby hipchat-rb gem. There doesn't seem to be a way to do this described in the readme of this gem. Is it possible to do this? 回答1: the working solution: #!/usr/bin/env ruby require 'hipchat' client = HipChat::Client.new('HIPCHAT_TOKEN', :api_version => 'v2', :server_url => 'HIPCHAT_URL') client.user('some_username').send_file('message', File.open('some-file.txt') ) 来源: https://stackoverflow.com/questions/41271497/how-to-attach-files-to-ruby