Git Product home page Git Product logo

ruby-twitpic's Issues

gem

Hello,

Please, make a gem from this library.

uninitialized constant PhotosController::TwitPic

Hey,
I'm trying to implement your library but I got some issues.

First I've installed necessary gems:

carlo@hd:~/public_html/hdr3dev$ gem install twitpic
Fetching: highline-1.6.5.gem (100%)
Fetching: oauth-0.4.5.gem (100%)
Fetching: rubytter-1.4.2.gem (100%)
Fetching: twitpic-0.3.1.gem (100%)
Successfully installed highline-1.6.5
Successfully installed oauth-0.4.5
Successfully installed rubytter-1.4.2
Successfully installed twitpic-0.3.1
4 gems installed

carlo@hd:~/public_html/hdr3dev$ gem install twitpic-full
Fetching: nestful-0.0.7.gem (100%)
Fetching: json-1.6.1.gem (100%)
Building native extensions.  This could take a while...
Fetching: roauth-0.0.8.gem (100%)
Fetching: twitpic-full-1.0.0.gem (100%)
Fetching: multi_json-1.0.3.gem (100%)
Successfully installed nestful-0.0.7
Successfully installed json-1.6.1
Successfully installed roauth-0.0.8
Successfully installed twitpic-full-1.0.0
Successfully installed multi_json-1.0.3
5 gems installed

I edited environment.rb as following:

config.gem 'twitpic-full', :require => 'twitpic'

Then I've edited my code as below:

class PhotosController < ApplicationController

  def posttwitpic

    @photo = Photo.find(7)

    twitpic = TwitPic::Client.new

    # This part is optional and only required if you are calling
    # write enabled methods against the TwitPic API.
    twitpic.configure do |conf|
      conf.api_key = "..."
      conf.consumer_key = "..."
      conf.consumer_secret = "..."
      conf.oauth_token = "..."
      conf.oauth_secret = "..."
    end

    media = twitpic.upload("#{@photo.cloudfront_url(:medium)}", "TwitPic test #photography")
  end

end

This is the error I got:
uninitialized constant PhotosController::TwitPic

Can you help me with this?

Version issues

Hi meltingice,

I noticed that on rubygems we have version 1.0.1 of ruby-twitpic (twitpic-full) but on github we do have version 1.0.0. Is there a reason for that? Which is the more recent gem now, the one here or the one on rubygems.

thank you
p

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.