Rake doesn't work with latest Compass? "uninitialized constant Sass::Script (NameError)" - rake

I've been playing with Octopress for few days and today wanted to try latest Susy v. 2.1.2 which requires Compass v. 1.0 (1.0.0.alpha.19 atm) which requires Sass v. 3.3 , as far as I know… Beside that, according to the Susy changelog, Susy is registered with Compass 1.0 automatically.
So I modified my Gemfile:
source "https://rubygems.org"
group :development do
gem 'rake', '~> 10.0'
gem 'jekyll', '~> 0.12'
gem 'rdiscount', '~> 2.0.7'
gem 'pygments.rb', '~> 0.3.4'
gem 'RedCloth', '~> 4.2.9'
gem 'haml', '~> 3.1.7'
gem 'compass', '1.0.0.alpha.19'
gem 'sass', '~> 3.3'
gem 'sass-globbing', '~> 1.0.0'
gem 'rubypants', '~> 0.2.0'
gem 'rb-fsevent', '~> 0.9'
gem 'stringex', '~> 1.4.0'
gem 'liquid', '~> 2.3.0'
gem 'directory_watcher', '1.4.1'
end
gem 'sinatra', '~> 1.4.2'
So I did bundle install. But it seems rake generate neither rake preview don't like new Compass at all. Gettin plenty of these:
/Library/Ruby/Gems/2.0.0/gems/compass-core-
1.0.0.alpha.19/lib/compass/core/sass_extensions.rb:2:in `<top
(required)>': uninitialized constant Sass::Script (NameError)
Compass alone working without any problem. Though, I'm pretty new to Rake, Compass, Octopress so am I missing something?

Related

how can i change heroku databse / hosting

I would like to change my heroku database to something that allows for concurrent connections as my site is getting some traffic and seems to crash when multiple users are attempting to access the site. i have looked into changing my DB to unicorn but not sure if this is what I really need. I am a beginner and any insight into what I need to do would be extremely useful!
my gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
# 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
gem 'bootstrap-sass'
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development, :test do
gem 'sqlite3'
end
# 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
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]
Setting up puma is very straight forward. Follow this step by step: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server
That said, I would dig deeper. Changing to puma is worth doing regardless but it may not be the root of your problem. App could be crashing for a number of reasons.
Here are the puma docs as well, just in case: https://github.com/puma/puma

Sprockets::FileNotFound: couldn't find file 'jquery.ui.all' on Rails 4

Sprockets::FileNotFound: couldn't find file 'jquery.ui.all'
I attempted all recommendations found so far.
None of them works for me.
I cannot run anymore the program in development and as such I cannot anymore make a new deployment online.
Gemfile
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '>=1.1.2'
gem 'pg', '>=0.15.1'
gem 'uglifier', '>=2.1.1'
gem 'coffee-rails', '>=4.0.0'
gem 'jbuilder', '~> 1.2'
gem 'activerecord-import', '>=0.4.1'
gem 'rubyzip2'
gem 'date_validator'
gem 'psych', '~> 2.0.5'
gem 'json', '>=1.8.1'
gem 'turbolinks', '>=1.1.1'
gem 'sass-rails', '>=4.0.0'
gem 'bootstrap-sass', '>=3.0.0.0'
gem 'will_paginate', '>=3.0.4'
gem 'bootstrap-will_paginate','>=0.0.9'
gem 'bootstrap-sass-rails'
gem 'bootstrap-datepicker-rails'
gem 'jquery-ui-bootstrap-rails'
gem 'geocoder'
gem 'jquery', '>=0.0.1'
gem 'jquery-rails', '>=2.2.1'
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
gem 'jquery-ui-rails'
gem 'gmaps4rails'
group :doc do
gem 'sdoc', '>=0.3.20',require: false
end
group :production do
gem 'rails_12factor', '>=0.0.2'
end
group :test do
gem 'selenium-webdriver', '>=2.0.0'
gem 'capybara', '>=2.1.0'
gem 'factory_girl_rails', '>=4.2.1'
end
group :development, :test do
gem 'rspec-rails', '>=2.13.1'
end
My application.js is
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '>=1.1.2'
gem 'pg', '>=0.15.1'
gem 'uglifier', '>=2.1.1'
gem 'coffee-rails', '>=4.0.0'
gem 'jbuilder', '~> 1.2'
gem 'activerecord-import', '>=0.4.1'
gem 'rubyzip2'
gem 'date_validator'
gem 'psych', '~> 2.0.5'
gem 'json', '>=1.8.1'
gem 'turbolinks', '>=1.1.1'
gem 'sass-rails', '>=4.0.0'
gem 'bootstrap-sass', '>=3.0.0.0'
gem 'will_paginate', '>=3.0.4'
gem 'bootstrap-will_paginate','>=0.0.9'
gem 'bootstrap-sass-rails'
gem 'bootstrap-datepicker-rails'
gem 'jquery-ui-bootstrap-rails'
gem 'geocoder'
gem 'jquery', '>=0.0.1'
gem 'jquery-rails', '>=2.2.1'
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
gem 'jquery-ui-rails'
gem 'gmaps4rails'
group :doc do
gem 'sdoc', '>=0.3.20',require: false
end
group :production do
gem 'rails_12factor', '>=0.0.2'
end
group :test do
gem 'selenium-webdriver', '>=2.0.0'
gem 'capybara', '>=2.1.0'
gem 'factory_girl_rails', '>=4.2.1'
end
group :development, :test do
gem 'rspec-rails', '>=2.13.1'
end
application.css
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*= require dataTables/src/demo_table_jui
*= require dataTables/extras/dataTables.colReorder
*= require dataTables/extras/dataTables.tableTools
*= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
*= require dataTables/extras/dataTables.tableTools
*= require bootstrap
*= require jquery.ui.all
*= require jquery.ui.core
*= require jquery.ui.theme
*= require bootstrap-datepicker
*= require_self
*= require_tree .
*/
I ran into a similar issue and it turned out that at some point they started using jquery-ui instead of jquery.ui and there is no need to have the all part anymore
//= require jquery-ui
See the section titled Require Specific Modules on the jquery-ui-rails page for more information.
I found the problem. When integrating bootstrap with data tables when changes are introduced in files and folder names in both sides, nothing works anymore. So I separated them, I am using bootstrap for buttons and menus and data tables html style, no bootstrap integration and work perfectly, fast and smooth. Looks like these these folks can't keep up with each other.

Git error while trying to install Active Admin from Github

Everything was working until I installed the Active Admin get with the settings.
This is what happens when I run bundle install:
Fetching git://github.com/gregbell/active_admin.git
fatal: unable to connect to github.com:
github.com[0: 192.30.252.129]: errno=Operation timed out
Git error: command `git clone 'git://github.com/gregbell/active_admin.git'
"/Users/Kenneth/.rvm/gems/ruby-2.0.0-p353/cache/bundler/git/active_admin-d67faab65e9b74efbc8efb4a777a851e9f78b2ca"
--bare --no-hardlinks` in directory /Users/Kenneth/Desktop/U2K has failed
My Gemfile looks like this:
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.1'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'bootstrap-sass', '~> 3.0.3.0'
gem 'devise', '~> 3.1.1'
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'jbuilder', '~> 1.2'
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
Thanks
try in terminal first to exlcude any issue with bundler, but your issues seems intermittent with github connection.
$ git clone 'git://github.com/gregbell/active_admin.git
secondly, try a specific commit - like
gem 'activeadmin', github: 'gregbell/active_admin' , :ref => '2c1a16368fd5fb8122329eb61c848bbd0e516870'

Bundler::GemNotFound: Could not find net-ssh-2.7.0 in any of the sources

I've added capistrano to my Gemfile. After running the bundle command I get the following Error:
Bundler::GemNotFound: Could not find net-ssh-2.7.0 in any of the sources
This is my Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
# Use mysql as the database for Active Record
gem 'mysql2'
# 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
gem 'simple_form'
gem 'jquery-rails'
gem 'less-rails'
gem 'therubyracer'
gem "liquid"
gem "devise"
gem "devise-basecamper"
gem "cancan"
gem 'userstamp', git: 'git://github.com/andrezimpel/userstamp.git'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
group :development do
gem 'capistrano'
end
# Use debugger
# gem 'debugger', group: [:development, :test]
When I remove gem 'capistrano' everything works fine!
I'm not sure where the problem is, I hope somebody could help me.
Running rvm env . > .powenv worked for me.
Seems that pow made me some trouble.
cc: pow says: Bundler::GemNotFound: Could not find rake-0.9.2.2 in any of the sources

Can't run heroku rake db:migrate even with 'pg' gem installed

I'm trying to run heroku rake db:migrate, and I get the following error:
rake aborted!
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
I've followed the instructions in this post, namely to:
add 'pg' to Gemfile, under :production
run bundle install --without production
But I still get the error.
Here's my Gemfile:
source 'http://rubygems.org'
gem "rails", "~> 3.1.0"
gem 'gravatar_image_tag', '1.0.0.pre2'
gem 'will_paginate', '~> 3.0.2'
gem 'jquery-rails', '>= 1.0.12'
group :assets do
gem 'sass-rails', "~> 3.1.0"
end
group :development do
gem 'rspec-rails', '2.6.1'
gem 'faker', '0.3.1'
gem 'sqlite3', '~> 1.3.4'
end
group :test do
gem 'rspec-rails', '2.6.1'
gem 'webrat', '0.7.1'
gem 'guard-rspec'
gem 'growl_notify'
gem 'factory_girl_rails', '1.0'
gem 'sqlite3', '~> 1.3.4'
end
group :production do
gem 'pg'
end
Someone on #RubyOnRails suggested it was an incorrectly configured database.yml for production, but to quote the Heroku site itself, "To ease deployment of typical Rails applications, Heroku automatically generates a new database.yml file on deployment."
I'm stumped. Any ideas?
Double check you've commit and pushed both the Gemfile and Gemfile.lock to Heroku.