rails -v
Активация вышеуказанной команды приводит к:
bin / rails: 7: bin / rails: Синтаксическая ошибка: "("неожиданно
Кажется, что мои рельсы в двигателе работают неправильно и не отвечают.
Это говорит о синтаксической ошибке, когда я пытаюсь вызвать rails -v или rails db:создать или что-то в этом роде.
rails s возвращает ту же ошибку
Вот остальные файлы .gemspec, которые я использовал:
# frozen_string_literal: true
$:.push File.expand_path('lib', __dir__)
# Maintain your gem's version:
require 'vulnerabilities/version'
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = 'vulnerabilities'
s.version = Vulnerabilities::VERSION
s.authors = ['Evgeny Karpenko']
s.email = ['e.karpenko@isoit.ru']
s.homepage = 'https://new.docshell.ru'
s.summary = 'Vulnerabilities Plugin for Docshell4'
s.description = 'VulnerabilitiesPlugin for Docshell4'
s.license = 'proprietary'
s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md']
s.add_dependency 'rails', '~> 5.1.6', '>= 5.1.6.1'
s.add_dependency 'active_model_serializers', '~> 0.10.7'
s.add_dependency 'kaminari', '~> 1.1', '>= 1.1.1'
s.add_dependency 'pg', '~> 1.1', '>= 1.1.2'
s.add_dependency 'swagger-blocks', '~> 2.0.2'
s.add_dependency 'rest-client', '~> 2.0', '>= 2.0.2'
s.add_development_dependency 'annotate'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'factory_bot_rails'
s.add_development_dependency 'faker'
s.add_development_dependency 'rspec'
s.add_development_dependency 'rspec-instrumentation-matcher'
s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'shoulda-matchers'
end
вот файл bin / rails, который не может запустить File.expand_path
# frozen_string_literal: true
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails gems
# installed from the root of your application.
ENGINE_ROOT = File.expand_path('..', __dir__)
ENGINE_PATH = File.expand_path('../lib/vulnerabilities/engine', __dir__)
APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__)
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
require 'rails/all'
require 'rails/engine/commands'