I cant deploy the middleman project - ruby

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

Related

Could not find Turbolinks

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]

bundle install error - Your bundle only supports platforms [] but your local platforms are ["ruby", "x86_64-linux"]

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.

Jekyll errors when starting the server

I'm running Octopress/Jekyll on Ubuntu.
When I do the following command:
$ bundle exec rake generate preview
I get the following error:
/var/lib/gems/2.3.0/gems/liquid-2.5.5/lib/liquid/htmltags.rb:43:
warning: key "index0" is duplicated and overwritten on line 46
Configuration file: /home/alex/Code/octopress/_config.yml
Source: source
Destination: public
Generating...
jekyll 2.0.0 | Error: undefined method `extname' for
#<Jekyll::StaticFile:0x00000003482d78>
Here is my Gemfile:
source "https://rubygems.org"
group :development do
gem 'rake', '~> 10.0'
gem 'jekyll', '~> 2.0'
gem 'octopress-hooks', '~> 2.2'
gem 'octopress-date-format', '~> 2.0'
gem 'jekyll-sitemap'
gem 'rdiscount', '~> 2.0'
gem 'RedCloth', '~> 4.2.9'
gem 'haml', '~> 4.0'
gem 'compass', '~> 1.0.1'
gem 'sass-globbing', '~> 1.0.0'
gem 'rb-fsevent', '~> 0.9'
gem 'stringex', '~> 1.4.0'
gem 'pygments.rb'
gem 'maruku'
end
gem 'sinatra', '~> 1.4.2'
Anyone got any ideas?
Thanks in advance!
I've resolved these errors by updating my Gemfile to:
source "https://rubygems.org"
group :development do
gem 'rake', '~> 10.0'
gem 'jekyll', '~> 3.4'
gem 'octopress-hooks', '~> 2.2'
gem 'octopress-date-format', '~> 3.0'
gem 'jekyll-sitemap'
gem 'rdiscount', '~> 2.0'
gem 'RedCloth', '~> 4.2.9'
gem 'haml', '~> 4.0'
gem 'compass', '~> 1.0.1'
gem 'sass-globbing', '~> 1.0.0'
gem 'rb-fsevent', '~> 0.9'
gem 'stringex', '~> 1.4.0'
gem 'pygments.rb', '~> 0.6.3'
gem 'jekyll-paginate'
end
gem 'sinatra', '~> 1.4.2'
Note that my pygments.rb gem doesn't seem to work properly - it doesn't highlight the code syntax according to language (i.e. Ruby): it just changes the font family and keeps it in a bland grey colour (instead of highlighting in Ruby colours).
But that's another issue.
For now, the initial errors - at least - are resolved.

Install gem from github using Rail 3

I need to install wicked_pdf gem from github. I also updated Gemfile but when I run bundle install it gave me the following message.
You need to install git to be able to use gems from git repositories. For help
installing git, please refer to GitHub's tutorial at
https://help.github.com/articles/set-up-git
I have the Gemfile which is given below.
Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.19'
gem 'mysql'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "bcrypt-ruby", :require => "bcrypt"
gem 'momentjs-rails', '>= 2.8.1'
gem 'bootstrap3-datetimepicker-rails', '~> 4.0.0'
gem 'bootstrap-datepicker-rails', '>= 0.6.21'
gem 'will_paginate', '~> 3.0'
gem 'wicked_pdf', :github => 'mileszs/wicked_pdf', :branch => 'master'
I have already installed git-cell on my system and i am using win-7 64 bit. Please help me to resolve this issue.

Ruby on Rails, Sprockets::FileNotFound, Error compiling CSS asset

I am trying to install Ruby on Rails on my Mac. When I run "Rails s" it runs fine, but when I go to "localhost:3000" in my browser I get the following error:
Error Compiling CSS asset
Sprockets::FileNotFound: Couldn't find file 'unify/sliders/revolution/bg-text.png'
(in /Users/user1/project/app/assets/stylesheet/unify/plugins.css.erb)
/Library/Ruby/Gems/2.0.0/gems/sprockets-2.10.1/lib/sprockets/base.rb:153:in `resolve'
My gemfile looks like this:
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.5'
gem 'meta-tags'
gem 'pg'
group :production do
gem 'rails_12factor'
end
group :development do
gem 'sqlite3'
end
group :development do
# gem 'better_errors'
# gem 'binding_of_caller'
# gem 'pry'
# gem 'sprockets_better_errors'
gem 'rails-dev-tweaks', '~> 1.1'
gem 'thin'
end
gem 'dotenv-rails', :groups => [:development, :test]
gem 'sass-rails', '~> 4.0.0'
gem 'compass-rails'
gem 'font-awesome-sass'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'therubyracer'
gem 'less-rails' #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem 'twitter-bootstrap-rails', :github => 'seyhunak/twitter-bootstrap-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
group :doc do
gem 'sdoc', require: false
end
gem 'unicorn'
gem 'community_engine', :git => 'https://github.com/bborn/communityengine.git', :branch => :rails4
gem 'bootstrap_form'
gem 'omniauth-facebook', '~> 1.6.0'
gem 'omniauth-twitter'
gem 'json'
gem 'rest-client'
gem 'authlogic', '3.4.0'
gem 'jquery-datatables-rails', '~> 2.2.1'
gem 'gmaps4rails'
gem 'underscore-rails'
gem 'twitter', '~> 5.9.0'
gem 'feedjira', :git => 'https://github.com/feedjira/feedjira.git'
gem 'nokogiri', '>= 1.5'
gem 'sidekiq'
gem 'whenever', :require => false
gem 'bootstrap-kaminari-views'
gem 'factual-api'
gem 'activerecord-import'
gem 'treat', github: 'louismullie/treat'
gem 'engtagger'
gem 'jqcloud-rails'
gem 'embedly'
gem 'yaml_db', github: 'jetthoughts/yaml_db', ref: 'fb4b6bd7e12de3cffa93e0a298a1e5253d7e92ba'
gem 'acts_as_follower'
gem 'acts_as_votable', '~> 0.9.0'
gem 'impressionist'
gem 'youtube_it', github: 'jsh-c/youtube_it'
gem 'open_uri_redirections'
gem 'aws-sdk'
gem 'momentjs-rails', '2.7.0'
gem 'bootstrap-daterangepicker-rails', :git => 'https://github.com/jordanbrock/bootstrap-daterangepicker-rails.git', :branch => :rails4
gem 'axlsx_rails'
gem 'zip-zip'
gem 'to_csv-rails', :git => 'git://github.com/liangwenke/to_csv-rails.git'
gem 'newrelic_rpm', group: :production
gem 'seed-fu', '~> 2.3'
gem 'mongo'
gem 'bson_ext'
gem 'bootstrap-sass', '~> 3.2.0'
gem 'jquery-turbolinks'
gem 'tweetstream'
gem 'sitemap_generator'
gem 'ckeditor'
gem 'rails-i18n', '~> 4.0.0' # For 4.0.x
I appreciate the help!

Resources