Questions tagged [rubygems]

1

votes
1

answer
27

Views

Bundler: Create Gem - Default Contact Info Source?

I followed this guide to build my first Ruby Gem: http://bundler.io/v1.12/guides/creating_gem.html Everything worked as expected, but I have one question: I noticed that Bundler auto-magically pulled my personal contact info from somewhere (I'm on a Mac) and used that to build the gem. An example o...
Pseudo
1

votes
1

answer
123

Views

Problems sign up to facebook with ruby on rails

when I sign up using facebook my url is http://localhost:3000/registration then it will change to http://localhost:3000/registration#= but it wont let me login that the only thing it changes on that page just the url. Contoller class OmniauthCallbacksController < Devise::OmniauthCallbacksController...
AB74574
1

votes
2

answer
111

Views

Could not find gem 'canvas_connect (= 0.3.12 )' in any of the gem sources listed in your Gemfile or available on this machine

When run bundle install getting this error https://i.stack.imgur.com/V4O3U.png In Gemfile gem 'canvas_connect', '0.3.12' gem 'adobe_connect', '1.0.6', require: false
Manisha Odedara
1

votes
1

answer
17

Views

Why “PG::UndefinedColumn:” from a column who come from a gem?

I've got a gem named Foo. In this gem I've got 2 branches : master and develop. In my project I need to use the develop branch (which contain new migrations). So in my gemfile I add : gem 'foo', git: 'https://github.com/orsay/foo.git', branch: 'develop' Then run bundle install then re launch my serv...
Orsay cp
1

votes
0

answer
132

Views

sudo gem install rmagick fails - mac sierra high - RoR

I cant seem to run sudo gem install rmagick -v '2.15.4' the following errors appears. ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/rmagick-2.15.4/ext/RMagick /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr...
Axil
1

votes
0

answer
117

Views

Rails gon with jbuilder not working in production

Rails 5 app using gon 6.2.0 and jbuilder 2.7.0 My issue is in production mode, but in development everithing works fine my production log: Errno::ENOENT (No such file or directory @ rb_sysopen - app/views/productos/index.json.jbuilder): F, [2018-01-26T21:03:03.809472 #7851] FATAL.... but the file ex...
matQ
1

votes
1

answer
219

Views

Can't figure out how to get 'bcrypt' working in ruby on rails (WIN 10)

I've almost given up , after trying countless solutions , nothing has worked for me till now. I'm running Ruby 2.3.3 and rails 4.2.8 on windows 10 64-bit I've installed Ruby , Rails and DevKit using Rails Installer. I installed bcrypt v 3.1.7 ( to avoid compatibility issues ) gem list bcrypt * LOCAL...
Mihir Deshpande
1

votes
1

answer
70

Views

Checking on empty gems cache fails using Serverspec for Docker image build testing

I'm currently having an issue with testing Docker image builds by means of Serverspec. In a nutshell, what I want to do is ensuring that during the image build the Ruby gems build cache gets cleared explicitly, e.g. by issuing rm -rf /usr/lib/ruby/gems/*/cache/*.gem in the Dockerfile. The Dockerfil...
pklndnst
1

votes
0

answer
443

Views

mysql2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension

When I download the rails application from github https://github.com/ari/jobsworth An then give bundle install it throws error: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. An error occurred while installing mysql2 (0.4.4), and Bundler cannot continue. Make sure that `gem insta...
Tech Geek
1

votes
1

answer
110

Views

How do I catch the referer URL in my session before embarking on an authentication with Omniauth?

I'm using Rails 5. I'm using the Omniauth gem (but not Devise) for authentication with the following sites (from my Gemfile) ... gem 'omniauth-oauth2', '~> 1.3.1' gem 'omniauth-google-oauth2' gem 'omniauth-facebook' gem 'omniauth-twitter' gem 'omniauth-linkedin-oauth2' I have links on my page that...
Dave
1

votes
0

answer
66

Views

cannot load such file — 2.3/bcrypt_ext which worked before in the file

I've started a project and I ran into a massive issue with bcrypt. It worked perfectly fine before (it broke even on a backup file of a previous version). Here's my error when I try to create a new user or log in: Processing by Devise::SessionsController#new as HTML Parameters: {'utf8'=>'✓', 'au...
SapphireJones
1

votes
1

answer
116

Views

Finding records by ID with Ransack

I am working with a rails app that uses ransack. I currently have an error in one of the views. The error reads No valid predicate for course_id Upon researching, the solution seems to be converting the id columns from integer to string. I saw this code online but i am confused as to which file to...
Hakeem Baba
1

votes
1

answer
288

Views

Ruby on Rails NoMethodError: undefined method `[]' for nil:NilClass

I'm new to ruby on rails and currently working on a web application which uses the 'rspotify' gem to interact with the Spotify API. I have a controller called 'genre' which I use to direct my search results from the index page. However, it won't let me initialize any variables inside the index funct...
jerusha
1

votes
0

answer
60

Views

Heroku push rejected because gem checksum failed

I've been pushing updates to my app successfully all week. This morning I went to push another update (just some CSS changes) and suddenly I'm my pushes are being rejected because the checksums on numerous gems seem to be randomly failing. I say randomly because each time I've tried pushing, the fai...
Daniel Bonnell
1

votes
0

answer
36

Views

Configuration blocks in a Rails initializer don't work with local-path gems (?)

In my Rails app Gemfile, I have gem 'myfancygem', path: '/Users/matt/myfancygem' This works as you'd expect. I then added a configuration block feature to the gem, a la https://robots.thoughtbot.com/mygem-configure-block (and many others out there that are slight variants on this) I created an initi...
mepatterson
1

votes
0

answer
355

Views

Failed to build gem native extension - Ruby in Windows

I'm facing some problems at Windows 10 to install native extensions. This happened with many native gems. C:\Ruby23x64\bin>gem install websocket-driver Building native extensions. This could take a while... ERROR: Error installing websocket-driver: ERROR: Failed to build gem native extension. curre...
Thiago Lipovscek
1

votes
0

answer
222

Views

I cannot install bindex

I've cloned my own app from Heroku (where it works prefectly fine) and want to run a server on my machine to edit the app. I'm trying to bundle my gems, but I receive the message: An error occurred while installing bindex (0.5.0), and Bundler cannot continue. Make sure that `gem install bindex -v '0...
bloomers
1

votes
0

answer
265

Views

How to run migrations from a gem

I have a gem installed in my rails app, and it has some migrations in /db/migrate how can I run them? I've tried running bundle exec rails g gem-name:install but I get an error saying could not find generator gem-name:install. I've run up against this problem with 3 different Gems this morning....
Will
1

votes
0

answer
54

Views

Missing Paperclip methods when updating Ruby, Rails and gems

I've updated my gem file to Ruby 2.5, Rails 4.2.10, paperclip 4.3.6 and devise 4.4.2 and I now get method missing errors for devise and then paperclip. Why? What extra needs to be done to correctly update? `method_missing': undefined method `devise' I can get round the devise errors by adding this...
Will
1

votes
1

answer
192

Views

error on Real time messages with Action Cable ruby on rails

I'm building text message system that will save to sqlite, the error im getting is from the code. on creating new message I get this error ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked: INSERT INTO 'notifications' ('content', 'user_id', 'created_at', 'updated_at') VALUES...
Maverick
1

votes
0

answer
304

Views

ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked

I know this a duplicate question but i tried all other solutions did not work for me. when I create new message it does not insert it in on first click and on the second click it insert the same message twice, if I look at the terminal after the first click i get ActiveRecord::StatementInvalid (SQL...
Maverick
1

votes
0

answer
140

Views

Sass error installing

I have this message on mac High Sierra when i try to install sass MBP-de-Patricia:~ patricia$ sudo gem install sass Password: Building native extensions. This could take a while... ERROR: Error installing sass: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3...
patt caba
1

votes
0

answer
110

Views

converting sqlite to mysql for Ruby on Rails app on macOS Sierr

Im following the steps in Convert a Ruby on Rails app from sqlite to MySQL? to convert sqlite to mysql for Ruby on Rails app on macOS Sierra but when I get to this step sudo gem install mysql I get an error ERROR: Error installing mysql: ERROR: Failed to build gem native extension. current direct...
Maverick
1

votes
2

answer
252

Views

Rails gem Permission denied @ rb_sysopen

There is gem country-state-select, I have to fork as gem was not maintained & required few custom changes. made changes & pushed code. than in gem file used gem 'country_state_select', '~> 3.1', :github => 'Faisal-nfl/Country-State-Select', :branch => 'faisal-dev' Data for country-state-select gem i...
1

votes
1

answer
177

Views

Overcommit gem is preventing a commit

I have installed a ruby on rails application that was running on another machine that used the overcommit gem. I do not want to use the overcommit gem. When I try to do a commit e.g. git commit -m 'Add something' I have the error message This repository contains hooks installed by Overcommit, but...
Obromios
1

votes
1

answer
328

Views

Rails 5 production error: Cannot define multiple 'included' blocks for a Concern (ActiveSupport::Concern::MultipleIncludedBlocks)

I'm running into an error while deploying production (both remote and locally). Development runs just fine. /Users/nope/.gem/ruby/2.5.1/gems/activesupport- 5.1.6/lib/active_support/concern.rb:126:in `included': Cannot define multiple 'included' blocks for a Concern (ActiveSupport::Concern::Multi...
do0fusz
1

votes
0

answer
94

Views

Loading command: install (LoadError) cannot load such file — socket

I bought new Macbook pro and moved all data from iMac to new Mackbook pro. then I tried to check the version of bundle with 'bundle -v', I got -bash: bundle: command not found them I tried 'gem install bundler', I got ERROR: Loading command: install (LoadError) cannot load such file -- socket ERRO...
riiinoj
1

votes
1

answer
95

Views

Android-Travis CI. Unable to login using travis login --pro command

I need to encrypt keystore file. I've installed travis using gem. I can't able to login travis using my github account. Already travis is linked with github account. Ruby: Ruby 2.0.0-p645 RubyGem : 2.4.8 CLI : 1.8.8 **Error:** Last Exception An error occurred running `travis login --pro`: Type...
Kamal
1

votes
2

answer
275

Views

rubygem timeout on bundle update

I am getting a timeout error trying to update my gems. I would prefer not to have to change to unsecured paths. I can download the gems individually from rubygems using my browser - but gem update and rvm gemset update both fail with the following error: ERROR: While executing gem ... (Gem::Remote...
Chris Guard
1

votes
1

answer
42

Views

ruby “class << self” might cause the error in gem?

I am trying to get use out of the 'HTTP-Cookie' gem. Because I need it, working. But it seems that there is a Bug inside the Gem, and its not maintained for over one year. The solution is: Make it yourself. But my Ruby knowlege is limited on this point. (Otherwise i wouldn't use a gem for catching c...
Tim Tenb
1

votes
0

answer
57

Views

Namespacing all classes within a Ruby Gem?

Ok so I'm assuming this is either super trivial or not possible, but either way I'm struggling to find an answer on the issue. I'm making a gem in ruby right now that has many classes in many different files, all imported in the main gem file like so: # lib/main_gem_file.rb module MainGemFile Dir[...
Josh Hadik
1

votes
2

answer
356

Views

Uninstall all installed gems in a Rails project

First, I did not use rvm or rbenv. I want to uninstall every gem in my Rails project and then bundle from the beginning. Gem installation directory is pointing to my global directory so I can't just delete that one. In modern Javascript projects, you can simply rm -rf node_modules and npm/yarn insta...
Huy Vo
1

votes
0

answer
30

Views

Ruby gems loosing native extensions

I have been noticing a trend, but not a cause, over the past few months. Every few weeks when I go into a RoR project (not always the same project) and start up the server I receive an error that usually contains the phrase 'require': incompatible library version To fix it, I usually have to do gem...
1

votes
2

answer
61

Views

How can use [public] folder in Rails Engine?

I have a blog engine and add to a Rails App: Add public folder and file js to engine: \public\sliderengine\amazingslider.js edit file engine.rb of Engine: class Engine < ::Rails::Engine isolate_namespace Blorgh initializer 'static assets' do |app| app.middleware.insert_before(::ActionDispatch::Stat...
D T
1

votes
2

answer
48

Views

Local rake tasks require development gems to be in production group

I have some rake tasks that I only perform locally. However since I refer to the some gem classes in rake tasks, this seems to require that the gem be installed and loaded on the production server. Among other things this increases deploy time and memory usage on the server. This may or may not have...
pixelearth
1

votes
0

answer
60

Views

Gem railsconfig/config not loading when bundled into an app via mountable rails engine

I am writing a rails 5.2 mountable engine for configuring a rails application as part of an service oriented architechture. I have been trying to use the Config Gem inside of the engine and I keep getting the following error install_generator.rb:28:in 'create_database_yml': undefined method 'adapter...
Verty00
1

votes
0

answer
181

Views

Httparty and file upload

I'm working on a rails api only application. rails 5 and ruby 2.4 My requirement is that i have make a update request which sends files to the third party api. i'm using the Postman to make requests. Im using Httparty gem for the same. my params are below #, 'controller'=>'simplex', 'action'=>'updat...
Ajith
1

votes
0

answer
63

Views

Rails Sanitizer Loofah gem removes text after `<`

So I'm currently using loofah to sanitize my html. So I'm using an older version of rails/ruby so I can't upgrade my loofah and nokogiri and etc. Basically, any text after < will be erased. For example, Hello
christiancn7
1

votes
0

answer
42

Views

Bundle Install Taking Too Long after Update from Rails 4.2 to Rails 5.0

I recently tried (heavy emphasis on tried here) to update my app from Rails 4.2 to Rails 5.0. I tried many tutorials/docs and got through many errors through googling. I got it to a working version, but then it didn't run on Heroku...a gemfile mess. The advice I finally got was to get rid of vers...
Liz
1

votes
0

answer
54

Views

In Ruby, how do you get the sender, and more precisely the instance variable on which a method is called?

Context Ĝue is a toy project that enable me to learn more on Ruby through interesting challenge of using traits of Esperanto. The problem The current challenge: make respondo iĝu 42 the same as respondo = 42. Current attempted approach Since = is a keyword, it can't be aliased (not really everythi...
psychoslave

View additional questions