I have used the installer from rubyinstaller.org. But I get this error afterwards
Could not find gem 'turbolinks (~> 5) x86-mingw32' in any of the gem sources listed in your Gemfile.
I have tried some of the advices in the threats with a similar error, but no luck. Can someone guide in the right direction?
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.3'
# Use sqlite3 as the database for Active Record gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
# Use Puma as the app server gem 'puma', '~> 3.7'
# Use SCSS for stylesheets gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported \runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' gem
'turbolinks-source', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
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]
Related
this is the gem file
source 'https://rubygems.org'
gem 'middleman', '~> 4.2'
gem 'middleman-autoprefixer', '~> 2.7'
gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby, :x64_mingw]
gem 'wdm', '~> 0.1', platforms: [:mswin, :mingw, :x64_mingw]
gem "middleman-blog", "~> 4.0"
# Other gems
gem 'middleman-deploy', '~> 2.0.0.pre.alpha'
gem 'middleman-syntax', '~> 3.0'
gem 'redcarpet', '~> 3.4'
gem 'nokogiri', '~> 1.8', '>= 1.8.2'
gem 'builder', '~> 3.2', '>= 3.2.3'
gem 'bootstrap', '~> 4.0.0.beta2.1'
gem 'font-awesome-sass', '~> 4.7.0'
gem 'rails-assets-jquery', source: 'https://rails-assets.org'
gem 'rails-assets-popper.js', source: 'https://rails-assets.org'
gem 'rails-assets-modernizr', source: 'https://rails-assets.org'
How can I fix that! I cant deploy this What is the problem over here!
lol :smile: You have to build before
middleman build
middleman deploy
Just as an additional note (since I don't have enough reputation to comment) — you can configure middleman-deploy to automatically build the site each time you deploy by adding deploy.build_before = true in your config.rb, like this:
activate :deploy do |deploy|
deploy.deploy_method = :git
deploy.remote = 'https://github.com/your-username/your-repository.git'
deploy.branch = 'main' # (or whatever your branch is; presumably you've already got this set up)
deploy.build_before = true
end
Getting this error doing a bundle install; google around seems like a common issue but I can't seem to find the fix (seem suggestion on Gemfile.lock but I moved that file to another directory)
# bundle install
Your bundle only supports platforms [] but your local platforms are ["ruby", "x86_64-linux"], and there's no compatible match between those two lists.
Here's my Gemfile and there is no Gemfile.lock in the directory.
[root#ip-172-30-4-16 rails]# gem -v
2.6.11
[root#ip-172-30-4-16 rails]# ruby -v
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
[root#ip-172-30-4-16 rails]# bundle -v
Bundler version 1.14.6
[root#ip-172-30-4-16 rails]# cat Gemfile
source 'http://rubygems.org'
gem 'echoe'
gem 'rails', '~> 3.2.11'
gem 'mysql2'
gem 'prawn', '~> 0.5.0.1'
gem 'prawn-core', '~> 0.5.0.1', :require => 'prawn/core'
gem 'prawn-layout', '~> 0.2.0.1', :require => 'prawn/layout'
gem 'prawn-format', '~> 0.2.0.1', :require => 'prawn/format'
gem 'spreadsheet', '~> 0.6.5'
gem 'libxml-ruby', :require => 'libxml_ruby'
gem 'faker'
gem 'json'
gem 'rake'
gem 'jquery-rails'
gem 'therubyracer'
gem 'delayed_job_active_record'
gem 'daemons'
gem 'memcache-client'
gem 'rb-readline'
gem 'rubyzip', '~> 1.0.0'
gem 'zip-zip' # Rubyzip old API compatibility addon
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
#group :development do
# gem 'ruby-debug19'
#end
group :test do
gem 'flexmock', '= 0.9.0'
gem 'machinist', '= 2.0'
gem 'test-unit', '~> 1.2.3'
# Use SimpleCov and Coveralls for test coverage reports
gem 'simplecov'
gem 'coveralls'
end
group :production do
gem 'passenger'
end
group :test, :development do
gem 'rspec-rails', '~> 2.0'
end
I had the same issue, I had to remove the .bundle directory and then bundle install worked.
I was able to work around issue /w bundle install --no-deployment option
If you get this error when using GitHub Actions, you can fix it by adding the Ruby platform to your Gemfile.lock:
$ bundle lock --add-platform ruby
Then commit, and push your change.
I made an application using jruby but I want to get it to work on a different computer which only has ruby installed.
It won't let me just change the gemfile from jruby to ruby, so how can I change it to run based on ruby?
This is my gemfile using jruby:
source 'https://rubygems.org'
ruby '2.2.2', :engine => 'jruby', :engine_version => '9.0.0.0'
gem 'cowsay'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use postgresql as the database for Active Record
gem 'activerecord-jdbcpostgresql-adapter'
gem 'rails_12factor', group: :production
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]
gem 'puma'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
change this:
ruby '2.2.2', :engine => 'jruby', :engine_version => '9.0.0.0'
to:
ruby '2.2.2'
and change:
gem 'activerecord-jdbcpostgresql-adapter'
to:
gem 'pg'
You probably need to update you database.yml also. You didn't paste it here, so I can't be sure. Just lookup the pg gem to see what you need to configure your conetions to.
no need to actually change much stuff as suggested in the other answer.
in the Gemfile specify platform qualifiers for MRI/JRuby specific gems :
# ruby '2.2.2', :engine => 'jruby', :engine_version => '9.0.0.0'
# ...
gem 'rails', '4.1.8'
# ...
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
gem 'pg', platform: :mri
if you're not using anything AR-JDBC specific in database.yml (e.g. url: jdbc:postrgresql:...) than the same configuration with work on JRuby as well as C-Ruby
I am currently in the process of setting up my first Mongodb, Rails 4 environment and need to configure the gem before running bundle install. Here is my gem file.
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
# User mongoid for database.
gem 'mongoid', github: 'mongoid/mongoid'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
group :test do
gem 'cucumber-rails', :require => false
gem 'capybara'
#database_cleaner is not required, but highly recommended
gem 'database_cleaner'
end
It seems Mongo wont install as I cannot find the Mongo:Config file.
The config file is generated by running the following command:
rails g mongoid:config
Please read the mongoid documentation, it is quite good.
I did gem mysql2. This is how my GemFile looks like:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'mysql2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platform => :ruby
gem 'activerecord-mysql2-adapter'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
This is my configuration file:
development:
adapter: mysql2
encoding: utf8
database: qac_db
pool: 5
username: root
password:
socket: /tmp/mysql.sock
Where am I going wrong?
Delete the line gem 'activerecord-mysql2-adapter'. Then run bundle install.
For what it's worth, I deleted my database.yml, and recreated it, then everything started working. No idea why, permissions problem perhaps?