gemfile

How to run “bundle exec jekyll new .”

坚强是说给别人听的谎言 提交于 2020-06-14 05:57:51
问题 I'm trying to follow "Creating a GitHub Pages site with Jekyll" but when I run any of these commands: $ bundle exec jekyll VERSION new . $ bundle exec jekyll _4.0.0_ new . $ bundle exec jekyll 4.0.0 new . I get this error: "Could not locate Gemfile or .bundle/ directory" I have looked at several SO posts related to this error message, but none seem to have a fix for my problem. Perhaps I have missed something? Some relevant details: $ ruby -v ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86

Capybara::ElementNotFound: Unable to find xpath “/html”

谁说胖子不能爱 提交于 2020-01-14 10:13:08
问题 I'm following the Ruby on Rails tutorial at http://ruby.railstutorial.org/chapters/static-pages and came across the following error StaticPages Home page should have the content 'Sample App' Failure/Error: page.should have_content('Sample App') Capybara::ElementNotFound: Unable to find xpath "/html" # (eval):2:in `text' # ./spec/requests/static_pages_spec.rb:7:in `(root)' My Gem file is as follows source 'http://rubygems.org' gem 'rails', '3.0.10' gem 'jruby-openssl' gem 'activerecord

How to bundle install via a CLI/Ruby system call?

泪湿孤枕 提交于 2020-01-01 11:56:10
问题 Is it possible to run bundle install from a ruby system call? I'm trying to install gems and run tests for a project under another path... For example the command is: "cd /some/other/project && bundle install && gem list && rspec spec" Ideally I want to just run the tests via a rake file in one project whilst making sure the relevant gems for that project are install. The cd seems to be working correctly, if I run: "cd /some/other/project && pwd" It does give the correct path. But if I do

Gem::LoadError for mysql2 gem, but it's already in Gemfile

淺唱寂寞╮ 提交于 2019-12-28 03:23:09
问题 Gem::LoadError Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile This error occurred while loading the following files: active_record/base This is the error I get on running rails server. The mysql2 gem has been added to the Gemfile as well. I've done bundle install , and tried restarting the server but still get the error. 回答1: If you have this error when upgrading to rails 4.2.4 (also with rails 4.1.5) try using this version of mysql2:

Why do I get “error: failed to push some refs” when pushing to Heroku?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 16:55:51
问题 I want to upload my new app to Heroku, but I'm facing some problems. At first, the problem was SQLite, so I deleted the sqlite line in my Gemfile . Another problem is that when I write in console the command git push heroku , I see this error: error: failed to push some refs. Gemfile source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.0.0' group :production do gem 'pg' gem 'rails_12factor' end # Use SCSS for stylesheets gem 'sass-rails

Rails: Could not find gem 'sdoc (>=0) ruby'

元气小坏坏 提交于 2019-12-25 04:26:31
问题 I am developing a rails application in Mac after switching over from Windows. I thought that I had installed everything correctly. The IDE I'm using is Rubymine. I receive numerous error messages when the rake command is run at the start of a new application. The cause is: /Users/johncase/.gem/ruby/2.0.0/gems/bundler-1.5.1/lib/bundler/resolver.rb:302:in `resolve': Could not find gem 'sdoc (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound) I have installed sdoc multiple

Installing gem json 2.2.0 failed - windows

烂漫一生 提交于 2019-12-24 10:24:07
问题 I got an error trying to install gem json 2.2.0 to my project, so I look for many sites and tutorials but nothing help me with windows. Please see the problem below: Fetching json 2.2.0 Installing json 2.2.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator C:/Ruby24-x64/bin/ruby.exe -I C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0 -r ./siteconf20190412-3460-119pn5l.rb

Environment variable in Gemfile

杀马特。学长 韩版系。学妹 提交于 2019-12-24 05:03:34
问题 I'm having trouble using an environment variable in my Gemfile. I'm trying to load a gem from a private Github repository with an API key: auth = ENV['SECRET_GIT'] gem 'foobar', git: "https://#{auth}:x-oauth-basic@github.com/Foo/Bar.git" But if I puts my ENV['SECRET_GIT'] variable, there's nothing in it. I though you could do it this way because of these (especially the first one): - https://devcenter.heroku.com/articles/bundler-configuration#gem-source-username-and-password - https:/