This is my first time creating a Shopify App with Ruby so i have a few question, im trying to install using this command:
bundle install
But im getting this error:
[!] There was an error parsing `Gemfile`:
[!] There was an error while loading `my_app.gemspec`: cannot load such file -- my_app/version
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.
# from /var/www/html/shopify_app/my_app.gemspec:2
# -------------------------------------------
# $LOAD_PATH.push File.expand_path('../lib', __FILE__)
> require "my_app/version"
#
# -------------------------------------------
. Bundler cannot continue.
This is what i have already:
my_app.gemspec
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
require "my_app/version"
Gem::Specification.new do |s|
s.name = "my_app"
s.version = ShopifyApp::VERSION
s.platform = Gem::Platform::RUBY
s.author = "Shopify"
s.summary = %q{This gem is used to get quickly started with the Shopify API}
s.required_ruby_version = ">= 2.3.1"
s.add_runtime_dependency('rails', '>= 5.0.0')
s.add_runtime_dependency('shopify_api', '>= 4.3.5')
s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 1.2.0')
s.add_development_dependency('rake')
s.add_development_dependency('byebug')
s.add_development_dependency('sqlite3')
s.add_development_dependency('minitest')
s.add_development_dependency('mocha')
s.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(test|example)/}) }
s.test_files = `git ls-files -- {test}/*`.split("\n")
s.require_paths = ["lib"]
end
Any suggestion?
version.rblocated? It's either missing, or your load path orrequirestatement is wrong.Those are the possible alternatives. The error message tells you Ruby cannot findversion.rb, so start by figuring out where that file is, then add the location to the question here.