私は、キーワードを投稿して検索することができ、なぜそれが機能していないのかわからない、私は1000のものを変更し、エラーは、これは私のコントローラファイルTwitterの宝石でエラーが発生しました
def hello
@time = Time.now
def user_tweet
require "rubygems"
require "twitter"
# Certain methods require authentication. To get your Twitter OAuth credentials,
# register an app at http://dev.twitter.com/apps
Twitter.configure do |config|
config.consumer_key = 'xxxx'
config.consumer_secret = 'xxxx'
config.oauth_token = 'xxxx'
config.oauth_token_secret = 'xxxx'
end
# Initialize your Twitter client
client = Twitter::Client.new
# Post a status update
client.update("updated tweet")
redirect_to request.referer, :notice => 'Tweet successfully posted'
end
エンド
であり、これは私の見解ページ最後
<%= form_for (@tweet = Tweet.new, :url => user_tweet_path) do |tweet_form|
tweet_form.text_area :tweet_content, :id => "tweet"
tweet_form.submit "Tweet"
end %>
で、ここで私は取得していますエラーです:
構文エラー、予期しない「」、期待 『)』
私はちょうどビューファイルに<%= client.update("updated tweet")%>
を入れてみましたが、それは未定義の変数エラーが発生した、私はレールに新たなんだ、そう任意のヘルプありがとう、ありがとう。
そのエラーのスタックトレースがありますか? – rkb