-3

I found a project on GitHub but I have problems running it. Can someone please try and let my know how to do this?

I downloaded the project, started a new project on rails, go to myapp/ and tried rails s but it's not starting.

I installed all the gems and now it shows me this error: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in require': cannot load such file -- sqlite3/sqlite3_native (LoadError)

Like this look my gemfile

source 'https://rubygems.org'

git_source(:github) do |repo_name|   repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")   "https://github.com/#{repo_name}.git" end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.1.4'


gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0'

gem 'bootstrap-sass', '~> 3.3', '>= 3.3.7'    gem 'sqlite3', '~> 1.3', '>= 1.3.13' gem 'jquery-rails' gem 'jquery-migrate-rails' gem 'pg' gem 'devise', '~> 4.4', '>= 4.4.1' gem 'redactor-rails', '~> 0.5.0' gem 'carrierwave', '~> 1.2', '>= 1.2.2' gem 'mini_magick', '~> 4.8'
#gem 'kaminari' gem 'activeadmin', '~> 1.2', '>= 1.2.1' gem 'ransack' gem 'delayed_job_active_record' gem 'slim' gem 'omniauth' gem 'omniauth-facebook' gem 'acts-as-taggable-on'



gem 'coffee-rails', '~> 4.2'

gem 'turbolinks', '~> 5'

gem 'jbuilder', '~> 2.5'




group :development, :test do   # Call 'byebug' anywhere in the code to stop execution and get a debugger console   gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]   # Adds support for Capybara system testing and selenium driver   gem 'capybara', '~> 2.13'   gem 'selenium-webdriver' end

group :development do   # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.   gem 'web-console', '>=
3.3.0' end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Error:

C:\Users\User\Desktop\myapp>rails s Traceback (most recent call last):
        22: from bin/rails:4:in `<main>'
        21: from bin/rails:4:in `require'
        20: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
        19: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
        18: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
        17: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        16: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        15: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `perform'
        13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `tap'
        12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `block in perform'
        11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `require'
        10: from C:/Users/User/Desktop/myapp/config/application.rb:7:in `<top (required)>'
         9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
         8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
         7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
         6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require'
         5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
         4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
         3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require'
         2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
         1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
jpn
  • 786
  • 6
  • 20
D. Matusik
  • 11
  • 2

1 Answers1

0

Basically to get any repo working on local, First thing you need to check is Gemfile and Database.yml

Here are the steps,

  1. Download the zip and Extract where you want.

  2. Open project and go to database.yml and Use proper database adapter, Username and password (for all environment) Here in test environment sqlite3 is used. You can change it to postgresql to solve your error.

  3. In gem file include the gem which you are using as database. If you are using mysql2 as adapter then add that gem in Gemfile.

  4. Bundle install.(This will make new dependencies, if you are getting versioning error here then delete Gemfile.lock and bundle install again[try this as final try, not recommanded though] )

  5. rake db:create and rake db:migrate

  6. Then start server by s

Ruturaj Bisure
  • 151
  • 1
  • 13