Я ЭТО РАБОТАЛ ...
для тех, кто сталкивается с трудностями в этом, вот решение.
Во-первых, произошла ошибка с самим гемом. Некоторый код необходимо изменить.
Проверьте эту версию драгоценного камня:
http://github.com/mindreframer/tumblr
Во-вторых, поскольку Tumblr позволяет использовать html, я вызываю sanitize в контроллере, чтобы сделать мой контент красиво отформатированным и чистым.
class PostsController < ApplicationController
include ActionView::Helpers::TextHelper
include ActionView::Helpers::SanitizeHelper
def tumblrsubmit
tumblruser = Tumblr::User.new('valid@email', 'validpass', false)
Tumblr.blog = 'blogname'
@post = Post.find(params[:id])
begin
unless @post.movie_id.nil? #checks if there is a movie ID
@tags = @post.tags.join(', ')
post = Tumblr::Post.create(tumblruser,
:type => 'video',
:embed => @post.video_html , #fetches the stored embed code
:caption => "Read Full Article & More at: <a href='http://www.mywebsite.com/posts/#{@post.slug}'>#{@post.title}</a> <p> </p>#{ActionController::Base.helpers.sanitize(@post.content)}",
:slug => @post.slug,
:tags => @tags )
else
post = Tumblr::Post.create(:tumblruser, :type => 'regular', :title => @post.title, :body => ActionController::Base.helpers.sanitize(@post.content), :slug => @post.slug)
end
@post.update_attributes(:tumbler_id => "#{post}") #updates the database with the new tumblr post id
flash[:notice] = "Successfully sent <strong>#{@post.title}</strong> to tumblr. with post id = #{post}"
rescue
flash[:error] = "You are unable to post <strong>#{@post.title}</strong> to tumblr at this time"
end
redirect_to :back
end
end
Я знаю, что это много, но это делает работу.
Надеюсь, это поможет кому-то еще.
Cheers,
Matenia