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.
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
Want to start rake command but get this problem
Could not find gem 'sass-rails (~> 4.0.3) x64-mingw32' in any of the gem sources listed in your Gemfile
Run bundle install to install missing gems.. Here is my gemlist
source 'https://rubygems.org'
gem 'rails', '4.1.4'
gem 'json','~> 1.8.1'
gem 'mongo','~>2.5'
gem "haml-rails", "~> 1.0"
gem "sass-rails",'~> 4.0.3'
gem 'jquery-rails', '~> 3.1.1'
gem 'jquery-ui-rails', '~> 5.0.0'
gem 'cgminer_api_client', '~> 0.2.3'
gem 'cgminer_monitor', '~> 0.2.18'
gem 'rake', '~> 10.3.2'
gem 'therubyracer', '~> 0.12.1'
gem 'thin', '~> 1.6.2'
gem 'uglifier', '~> 2.5.3'
group :development do
gem 'pry'
source 'https://rubygems.org'
gem 'nokogiri'
gem 'rack', '2.0.1'
gem 'rspec'
source 'https://rubygems.org'
gem 'nokogiri'
end
If i tring to get bundle install it's installing corectly, but when i'm tring to strt rake this problem appears again
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 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!
I am carrying out some development of a Ruby on Rails app between a Windows machine and linux machine. Not ideal but Ruby on Windows has improved a lot. Anyway i read that you can implement an IF statement so for example I have implemented this
source 'https://rubygems.org'
if RUBY_PLATFORM =~ /win32/
gem 'rails', '3.2.3'
gem 'sqlite3'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'nokogiri'
gem 'httparty'
gem 'devise'
else
gem 'rails', '3.2.3'
gem 'sqlite3', '1.3.6'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem 'less-rails'
gem 'uglifier', '>= 1.0.3'
gem 'execjs'
gem 'therubyracer', '0.10.2'
end
gem 'jquery-rails'
gem 'nokogiri'
gem 'httparty'
gem 'devise'
end
So this morning I merged my linux branch into the master branch (windows) and now i get the message
Could not find the less-rails in any of the sources
So it seems as if the IF statement has not worked or there is an issue with my bootstrap.css.less file in assets as I use this in my linux branch
How can i get this to work, so either have less working on both platforms or get windows to ignore the less gem
has anyone got around this before
UPDATE
Ok so i have found that if I specify
:platform => :ruby
after the less-rails gem it ignores it (though I had to add to execjs and rubyracer aswell) due to js runtime conflicts.. So question still remains as to what is wrong with my IF/ELSE statement
Thanks
Have you rebuilt the bundle lock file?
Try this on your Windows machine:
bundle install
bundle update
To learn about bundle, Gemfile, Gemfile.lock, and why you need to rebuild the lock when you switch platforms: http://gembundler.com/rationale.html