Add to rails application #20

Closed
Herz3h opened this Issue Jan 2, 2017 · 5 comments

Projects

None yet

2 participants

@Herz3h
Herz3h commented Jan 2, 2017

Hello,

This is probably a stupid question but i can't include the library in my rails application.

I added this to my Gemfile

gem 'exchanger'
and after running bundle, it got installed properly.

But when i try to do this :

folder = Exchanger::Folder.find(:calendar)
folder.items # return Exchanger::CalendarItem items

It tells me : uninitialized constant Exchanger

I added a require 'exchanger' in the controller where i put the code above. So i don't know what to do.

Please help, thanks!

@ebeigarts
Owner

@Herz3h it should work, can you check what happens in rails console when you do

require 'exchanger'
Exchanger
@ebeigarts
Owner

It should output something like:

$ gem install exchanger
Fetching: exchanger-0.2.0.gem (100%)
Successfully installed exchanger-0.2.0
$ irb
>> require "exchanger"
true
>> Exchanger
Exchanger
@ebeigarts
Owner

If you can't figure it out, can you show me your Gemfile and Gemfile.lock files?

@Herz3h
Herz3h commented Jan 2, 2017 edited

It works in the IRB console after doing a manual :

gem install exchanger

But not in the rails application, and here's my Gemfile : http://termbin.com/3emv

When i do :

require 'exchanger'

in the controller where i try to use Exchanger, i get cannot load such file.

@Herz3h
Herz3h commented Jan 2, 2017

Ok it works, had to restart the server...Sorry and thanks for the help !

@Herz3h Herz3h closed this Jan 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment