I installed zurb-foundation and sass using the steps on their getting started page e.g.
[sudo] gem install compass
cd path/to/where-you-want-your-project
run compass create <project-name> -r zurb-foundation --using foundation
But now I would like to revert back to bootstrap but I am unable to get rid of zurb-foundation from my Padrino project. Even after running gem uninstall zurb-foundation and checking every file in the project for a reference to "zurb" or "foundation" bundler reminds me that zurb is missing and every time I run bundle install it adds it to the project.
What is the best way to remove zurb-foundation from my Padrino app? Thanks
My Gemfile is
source 'https://rubygems.org'
# Distribute your app as a gem
# gemspec
# Server requirements
# gem 'thin' # or mongrel
# gem 'trinidad', :platform => 'jruby'
# Optional JSON codec (faster performance)
# gem 'oj'
# Project requirements
gem 'rake'
# Component requirements
gem 'bcrypt-ruby', :require => 'bcrypt'
gem 'sass'
gem 'haml'
gem 'activerecord', '>= 3.1', :require => 'active_record'
gem 'mysql2'
gem 'json'
gem 'annotate'
gem 'compass'
gem 'bootstrap-sass', '~> 2.3.1.2'
# gem 'activerecord-mysql2-adapter'
# Test requirements
gem 'shoulda', :group => 'test'
gem 'rack-test', :require => 'rack/test', :group => 'test'
# Padrino Stable Gem
gem 'padrino', '~> 0.11.1'
#rabl needs to be after padrino
gem 'rabl'
# Or Padrino Edge
# gem 'padrino', :github => 'padrino/padrino-framework'
# Or Individual Gems
# %w(core gen helpers cache mailer admin).each do |g|
# gem 'padrino-' + g, '0.11.1'
# end
Related
I'm currently working on a Rails 5.2 application. In the Dockerfile I'm using ruby:2.5-alpine. when running the following code
pdf_attached_doc.image signature_image I get the following error.
ArgumentError: pathname contains null byte
from /usr/local/bundle/gems/prawn-2.2.2/lib/prawn/images.rb:148:in `initialize'
I tried brew prune and brew update without success. Here is my Dockerfile
FROM ruby:2.5-alpine
# Bare minimum dependencies for our Rails App with the Apline image;
# build-base, git, nodejs, linux-headers, postgresql-dev, tzdata
#
# Project dependencies include;
# pdftk
RUN apk add --no-cache --update \
bash \
build-base \
git \
nodejs \
pdftk \
postgresql-dev \
tzdata \
less
# Set the working directory for all commands after this
WORKDIR /app
# Bundle the application
# Copy our Gemfiles into the app directory and install
ADD ./rails_app/Gemfile \
./rails_app/Gemfile.lock \
/app/
RUN bundle install
Here is my Gemfile
# frozen_string_literal: true
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
# Use postgresql as the database for Active Record
gem 'pg'
# Loads environment variables from `.env`.
gem 'dotenv-rails', groups: %i[development test]
# Use Puma as the app server
gem 'puma', '~> 3.11'
# 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 'mini_racer', platforms: :ruby
# For svg sprites
gem 'svgeez', '~> 1.0', '>= 1.0.3'
# Interact with Box API via Boxr Ruby library.
gem 'boxr'
# 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'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# jquery-rails
gem 'jquery-rails', '~> 4.3', '>= 4.3.3'
# PDF merger
gem 'combine_pdf', '~> 1.0', '>= 1.0.14'
# PDF parse into form
gem 'pdf-forms', '~> 1.1', '>= 1.1.1'
# Add PNG, JPEG and Other images to PDF
gem 'prawn', '~> 2.1'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Parse address
# Use httparty for requests
gem 'httparty', '~> 0.16.2'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
gem 'pry-rails', group: :development
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
gem 'byebug', platforms: %i[mri mingw x64_mingw]
end
group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'web-console', '>= 3.3.0'
# Spring speeds up development by keeping your application running
# in the background. Read more: https://github.com/rails/spring
gem 'rubocop', '~> 0.59.1', require: false
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
Any help?
I don't understand docker with proficiency. But, all times that i had this error with ruby, is because on the situation i'ved been send a file in verification. The solution for those issues are send the file path instead the file.
I typed rails s to run my server then I got this:
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
Could not find gem 'pg' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
So I did bundle install then I got this:
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
I did brew install postgres to solve this but it still didn't work. Also I put 'gem pg '0.18.4' on Gemfile then did bundle install but still didn't work.
I need your help!
below is my Gemfile
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]
gem 'pg', group: :production
#gem 'pg', '0.18.4'
gem 'rails_12factor', group: :production
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/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
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# 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'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
Have you tried to clean and rebuild you gem bundle? You can do it with command bundle clean --force and then bundle install again.
Please be advised: the clean command will remove all your gems.
Post back the result of such commands if you decide to run them.
My gemfile for my Ramaze (rack) app looks like this.
source 'http://rubygems.org'
ruby '1.9.3'
gem 'ramaze', "<= 2012.04.14" #old version
gem "innate", ">= 2012.03", "< 2012.11" #old version
gem 'rack', "<= 1.4.1"
gem 'sequel'
#if defined? ENV['RACK_ENV'] == 'production' then gem 'pg' else gem 'sqlite3' end
gem 'pg'
gem "sentry-raven", :git => "https://github.com/coderanger/raven-ruby.git"
gem 'bcrypt-ruby'
gem 'rdiscount'
gem 'redcarpet'
gem 'pony'
gem 'bacon'
gem 'koala'
gem 'stop_forum_spam'
#source 'http://mirror1.prod.rhcloud.com/mirror/ruby/'
#gem 'nokogiri'
#gem 'capybara'
As you can see, the pg gem is defined in it. However when I do a git push on Openshift, it installs every gem on my gem file EXCEPT for pg. I've done bundle install on my computer before a push with a force_clean_build file in the .openshift folder, and it didn't help.
I'm using the Sequel ORM and aren't even using a postgres database in my app, so changing the subject, I've no idea why it wants the pg gem in the first place.
Are you using Windows?
Try looking at this:
https://bugzilla.redhat.com/show_bug.cgi?id=1126343
I'm getting this error on bundle install
$ bundle install
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Users/xxx/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:3.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Users/xxx/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/source.rb:162.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /Users/xxx/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/source.rb:162.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Users/xxx/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/source.rb:162.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /Users/xxx/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/source.rb:162.
Fetching source index for http://rubygems.org/
Could not find sprockets-2.0.0.beta.9 in any of the sources
This is a new codebase I got from a friend and I'm having problems running it on my computer. I have created the same rvm gemset. The Gemfile is as follows:
source 'http://rubygems.org'
gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'rack', :git => 'git://github.com/rack/rack.git'
gem 'rdiscount', :git => 'https://github.com/rtomayko/rdiscount.git'
gem 'stringex'
gem 'mysql'
gem 'mysql2'
gem 'oauth'
gem 'twitter'
gem 'gmail'
group :development, :test do
gem 'rspec', :git => 'https://github.com/rspec/rspec.git'
gem 'rspec-rails', :git => 'https://github.com/rspec/rspec-rails.git'
gem 'rspec-mocks', :git => 'https://github.com/rspec/rspec-mocks.git'
gem 'rspec-core', :git => 'https://github.com/rspec/rspec-core.git'
gem 'rspec-expectations', :git => 'https://github.com/rspec/rspec-expectations.git'
gem 'selenium-webdriver'
gem 'steak', :git => 'https://github.com/cavalle/steak.git'
gem 'factory_girl', :git => 'https://github.com/thoughtbot/factory_girl.git'
gem 'unicorn'
gem 'capistrano'
gem 'database_cleaner'
end
I'm assuming this is downloading the latest Rails version? I believe that may be the problem.
It's not a good idea to point to the master branch of a git repository, especially if you don't commit your Gemfile.lock in the SCM.
I encourage you to replace the :git references to use the gem version.
You can also remove duplicate dependencies. Example, if you include rspec-rails you don't need to list rspec-core and all rspec- libraries. They are already listed in the rspec-rails depedency list. Listing all dependencies and pointing them to the master branch is for sure the cause of several headaches.
Also, why are you using the mysql gem twice?
source 'http://rubygems.org'
gem 'rails', '3.1.0'
gem 'rdiscount'
gem 'stringex'
gem 'mysql'
gem 'mysql2'
gem 'oauth'
gem 'twitter'
gem 'gmail'
group :development, :test do
gem 'rspec-rails', '~> 2.6.0'
gem 'selenium-webdriver'
gem 'steak'
gem 'factory_girl'
gem 'unicorn'
gem 'capistrano'
gem 'database_cleaner'
end
I am getting this error when I run "bundle install"
Could not find gem 'febeling-rubyzip (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
My Gemfile looks like this
source 'http://rubygems.org'
gem 'rails'
gem "authlogic", :git => "git://github.com/binarylogic/authlogic.git"
gem "mechanize"
gem "hpricot"
gem "sqlite3-ruby"
gem "daemons"
gem 'sqlite3-ruby', :require => 'sqlite3'
gem "nokogiri"
gem "roo"
gem "zip"
gem "spreadsheet"
gem "builder"
gem "gimite-google-spreadsheet-ruby"
gem "febeling-rubyzip"
#gem "savon", "=0.7.9"
gem "savon"
#devise is required for rails_admin, but not used
gem 'devise'
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
gem 'febeling-rubyzip'
group :development, :test do
gem "rcov"
gem "capistrano"
end
group :development do
gem "ruby-debug"
gem "httpclient"
end
Any thoughts/tips would be greatly appreciarted.
Thanks, Chris
PS I am using rvm with per project gemsets. Whats probably quite pertinent is that I just did a "rvm gemset empty" and remove Gemfile.lock to do a clean install of the project's gems - things seemed ok prior to that :(
Replace 'febeling-rubyzip' with 'rubyzip'. The new way of naming the gems has changed and it does not have the creator's username (github username) attached to it.
Does gem query -r -n febeling-rubyzip find anything in your version of ruby/gems?