-1

I need to embed youtube videos in my rails application. For that I have added gem ‘youtube-g’ in Gemfile.

After that given bundle install. There was an error parsing Gemfile: Undefined local variable or method `‘youtube' for Gemfile. Bundler cannot continue.

Help me to find out the issue

Malarvizhi
  • 11
  • 3

1 Answers1

0

I think youtube-g is to old since, latest update for the gem after I checked it is 2009 from this link, alternative step for you to embed youtube video just insert this code below in your view, and change the one that I marked your_youtube_code depend with your logic

<iframe src='https://www.youtube.com/embed/<%= your_youtube_code  %>?rel=0&autoplay=<%= params[:autoplay] || 0 %>' frameborder='0' mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="1280" height="720"></iframe>
widjajayd
  • 6,090
  • 4
  • 30
  • 41