Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在rails应用程序中嵌入youtube视频时在gemfile中获取错误_Ruby On Rails_Gemfile - Fatal编程技术网

Ruby on rails 在rails应用程序中嵌入youtube视频时在gemfile中获取错误

Ruby on rails 在rails应用程序中嵌入youtube视频时在gemfile中获取错误,ruby-on-rails,gemfile,Ruby On Rails,Gemfile,我需要在rails应用程序中嵌入youtube视频。为此,我在Gemfile中添加了gem'youtube-g 在给定的包安装之后。分析Gemfile时出错:未定义的局部变量或Gemfile的方法“youtube”。绑定程序无法继续 请帮我找出问题我认为youtube-g太旧了,因为我检查后最新的gem更新是2009年,嵌入youtube视频的替代步骤就是在视图下方插入此代码,并根据您的逻辑更改我标记的代码 <iframe src='https://www.youtube.com/embe

我需要在rails应用程序中嵌入youtube视频。为此,我在Gemfile中添加了gem'youtube-g

在给定的包安装之后。分析
Gemfile
时出错:未定义的局部变量或Gemfile的方法“youtube”。绑定程序无法继续


请帮我找出问题

我认为youtube-g太旧了,因为我检查后最新的gem更新是2009年,嵌入youtube视频的替代步骤就是在视图下方插入此代码,并根据您的逻辑更改我标记的代码

<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>

将文件的相应部分添加到问题中。看来问题出在背后