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!
Related
Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
Ruby '2.3.3'
gem 'rails', '~> 5.2.1'
gem 'bootstrap-sass', '3.3.7'
gem 'puma', '~> 3.11'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'duktape'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
#gem 'redis', '~> 4.0'
gem 'bcrypt', '3.1.12'
#gem 'mini_magick', '~> 4.8'
#gem 'capistrano-rails', group: :development
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
end
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '>= 3.3.0'
end
group :test do
gem 'rails-controller-testing', '1.0.2'
gem 'minitest', '5.10.3'
gem 'minitest-reporters', '1.1.14'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
gem 'chromedriver-helper'
end
group :production do
gem 'pg', '0.18.4'
end
gem 'tzinfo-data', platforms: [:mingw,:mswin,:x64_mingw, :jruby]
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
uby '2.3.3'
gem 'rails', '~> 5.2.1'
gem 'bootstrap-sass', '3.3.7'
gem 'puma', '~> 3.11'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'duktape'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
#gem 'redis', '~> 4.0'
gem 'bcrypt', '3.1.12'
#gem 'mini_magick', '~> 4.8'
#gem 'capistrano-rails', group: :development
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
end
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '>= 3.3.0'
end
group :test do
gem 'rails-controller-testing', '1.0.2'
gem 'minitest', '5.10.3'
gem 'minitest-reporters', '1.1.14'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
gem 'chromedriver-helper'
end
group :production do
gem 'pg', '0.18.4'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
You probably have a previous DATABASE_URL environment variable set that is pointing to postgres db. DATABASE_URL overrides RAILS_ENV.
One option is to exit your session and try again in a new session if you haven't set permanent DATABASE_URL
unset your DATABASE_URL and you should be good.
"gem install pg" on the command line worked for me
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'm trying to get guard to run guard-sass and guard-jammit on Windows 7 x64, and the behaviour I'm seeing is that it runs, pauses then exits silently, even with --debug active.
We are trying to get our designers (who work on windows, for better or worse), to build things using HAML/SASS and to use automated magnification/asset bundling with Jammit, as opposed to hand-assembling this stuff.
Here is a typical run:
C:\Users\Shibbles\Documents\Inspire>bundle exec guard start --debug
C:\Users\Shibbles\Documents\Inspire>
My Gemfile looks like this:
source 'http://rubygems.org'
gem 'rack', '1.2.1'
gem 'linecache' # 1.8.7
gem 'rails', '3.0.9'
gem 'mysql2', '0.2.7'
gem 'capistrano'
gem 'capistrano-ext'
gem 'awesome_print'
gem "will_paginate", "~> 3.0.pre2"
gem 'haml'
gem 'haml-rails'
gem 'sass'
gem 'factory_girl'
gem 'factory_girl_rails'
gem 'jquery-rails', '>= 1.0.3'
gem 'devise'
gem 'guard'
gem "acts_as_list", "~> 0.1.3"
gem 'jammit'
gem 'win32-open3', :platforms => [:mingw_18, :mingw, :mswin]
gem 'rb-fchange', :platforms => [:mingw_18, :mingw, :mswin]
gem 'rb-notifu', :platforms => [:mingw_18, :mingw, :mswin]
group :development, :test do
gem 'ruby-debug' # 1.8.7
gem "rspec"
gem 'rspec-rails'
gem 'cucumber'
gem 'cucumber-rails'
gem 'capybara'
gem 'database_cleaner'
gem 'spork', '~> 0.9.0.rc'
gem 'rcov'
gem "guard-sass"
gem 'guard-rspec'
gem 'guard-spork'
gem 'guard-bundler'
gem 'guard-delayed'
gem 'growl'
gem 'webrat'
gem 'guard-shell'
end
I have recently upgraded my gemfile to try and get Rails 3.1 working with Jruby 3.1.
Here is my Gemfile:
source 'http://rubygems.org'
source 'http://gems.engineyard.com'
gem 'rails', '~> 3.1.0.rc4'
gem 'sass-rails'
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31'
gem 'fancy-buttons'
gem 'haml'
gem 'authlogic', :git => 'https://github.com/AndreasWurm/authlogic.git'#, :branch => 'rails3'
gem 'nokogiri'
gem 'bundler'
gem 'resque'
gem 'resque-meta'
gem 'jquery-rails'
gem 'rake'#, '~> 0.8.7'
gem 'eventmachine'
gem 'em-websocket'
gem 'json'
gem 'coffee-script'
gem 'uglifier'
platforms :jruby do
gem 'activerecord-jdbc-adapter'
gem 'activerecord-jdbcsqlite3-adapter'
gem 'jruby-openssl'
gem 'jdbc-mysql'
gem 'jruby-rack'
gem 'warbler'
#gem 'glassfish', '1.0.3.dev'
end
group :test, :development do
platforms :jruby do
gem 'jdbc-sqlite3', :require => false
gem 'fastercsv'
gem 'ruby-debug'
end
platforms :ruby do
gem 'sqlite3-ruby', :require => 'sqlite3'
end
gem 'mocha'
gem 'factory_girl'
gem 'fakeweb'
gem 'shoulda', :require => 'shoulda'
end
The problem is that when I run rake db:migrate, I get the following error message:
rake aborted! An error has occurred, this and all later migrations
canceled:
undefined method `rows' for nil:NilClass
Has anyone else experienced this.
Upgrading to rails 5 enabled my migrations to build from jruby 1.6.3 anyway:
source 'http://rubygems.org'
source 'http://gems.engineyard.com'
gem 'rails', '~> 3.1.0.rc5'
gem 'sass-rails'
gem 'compass', git: 'https://github.com/chriseppstein/compass.git',branch: 'rails31'
gem 'fancy-buttons'
gem 'haml'
gem 'authlogic', :git => 'https://github.com/AndreasWurm/authlogic.git'#, :branch => 'rails3'
gem 'nokogiri'
gem 'bundler'
gem 'resque'
gem 'resque-meta'
gem 'jquery-rails'
gem 'rake'#, '~> 0.8.7'
gem 'eventmachine'
gem 'em-websocket'
gem 'json'
gem 'coffee-script'
gem 'uglifier'
platforms :jruby do
gem 'activerecord-jdbc-adapter'
gem 'activerecord-jdbcsqlite3-adapter'
gem 'jruby-openssl'
gem 'jdbc-mysql'
gem 'jruby-rack'
gem 'warbler'
#gem 'glassfish', '1.0.3.dev'
end