RoR 3.0: rake db:create syntax error - mysql

* I'm going to learn Rails 3.1 better before I continue with this. Thanks for your help, everyone: I learned a lot! *
I'm trying to create an online portfolio based on Gullery, but I'm stuck at the very beginning: I can't create a database. When I run 'rake db:create', I get the following error:
rake aborted!
C:\Sites\gullery/RakeFile:14: syntax error, unexpected $end, expecting keyword_end
When I run a full trace, I get this:
C:\Sites\gullery>rake db:create --trace
rake aborted!
C:/Sites/gullery/Rakefile:14: syntax error, unexpected $end, expecting keyword_e
nd
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_
module.rb:25:in `load'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_
module.rb:25:in `load_rakefile'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:501:in `raw_load_rakefile'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:82:in `block in load_rakefile'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:81:in `load_rakefile'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:65:in `block in run'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:63:in `run'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in
`'
C:/RailsInstaller/Ruby1.9.2/bin/rake:19:in `load'
C:/RailsInstaller/Ruby1.9.2/bin/rake:19:in `'
When I searched for "syntax error, unexpected $end, expecting keyword_end" on Google, the answers suggested that I missed an end somewhere. Unfortunately, I don't have the experience to know which file is missing one. Is that even the right problem? If so, where should I look? If not, what's actually going on?
I'm using Ruby on Rails 3.0, Ruby 1.9.2, and mySQL.
Thanks in advance!
EDIT: The contents of C:\Sites\gullery\Rakefile:
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rdoc/task'
RDoc::Task.new do |rdoc|
require 'tasks/rails'
# Fail if unit tests fail
task :default => [:test_units, :test_functional]
EDIT 2: Adding an "end" to the Rakefile eliminates the syntax error, but I the database still won't work.
The new Rakefile:
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rdoc/task'
RDoc::Task.new do |rdoc|
end
require 'tasks/rails'
# Fail if unit tests fail
task :default => [:test_units, :test_functional]
And the new error/trace:
C:\Sites\gullery>rake db:create --trace
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/tas
k' (in RDoc 2.4.2+)' instead.
at C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rak
e/rdoctask.rb
C:/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/rdoc/task.rb:30: warning: already ini
tialized constant Task
rake aborted!
Don't know how to build task 'db:create'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task_
manager.rb:49:in `[]'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:115:in `invoke_task'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:94:in `block (2 levels) in top_level'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:94:in `each'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:94:in `block in top_level'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:88:in `top_level'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:66:in `block in run'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:63:in `run'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in
`'
C:/RailsInstaller/Ruby1.9.2/bin/rake:19:in `load'
C:/RailsInstaller/Ruby1.9.2/bin/rake:19:in `'

I'm running Rails 3.1 and my Rakefile looks like this:
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
V0100::Application.load_tasks
V0100 is my application name, corresponds to your "gullery".

Related

Error running Jekyll with --safe: Liquid Exception: undefined method `map' for "/portfolio":String

I'm currently in the process of migrating a Jekyll blog to a new theme and am now running into issues while pushing my site to GitHub pages and running the Jekyll site with the --safe flag.
Right now, the Jekyll site runs perfectly fine locally but I started hitting issues when pushing up to GitHub pages.
As a debugging measure, I read to ensure the Jekyll site runs without issues with the --safe flag which it does not.
However, I'm not exactly sure what the issue is here. Here's my output running it with bundle exec jekyll serve --safe --trace --verbose:
Rendering: portfolio/index.md
Pre-Render Hooks: portfolio/index.md
Rendering Markup: portfolio/index.md
Rendering Layout: portfolio/index.md
Layout source: site
Liquid Exception: undefined method `map' for "/portfolio":String Did you mean? tap in /_layouts/portfolio.html
/Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/filters.rb:303:in `sort_input': undefined method `map' for "/portfolio":String (NoMethodError)
Did you mean? tap
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/filters.rb:243:in `sort'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/strainer.rb:56:in `invoke'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/context.rb:86:in `invoke'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/variable.rb:84:in `block in render'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/variable.rb:82:in `each'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/variable.rb:82:in `inject'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/variable.rb:82:in `render'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/tags/assign.rb:26:in `render'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in `render_node_to_output'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/block_body.rb:91:in `render'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/template.rb:208:in `block in render'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/template.rb:242:in `with_profiling'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/template.rb:207:in `render'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/liquid-4.0.3/lib/liquid/template.rb:220:in `render!'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:126:in `render_liquid'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:195:in `render_layout'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:158:in `place_in_layouts'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:88:in `render_document'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/renderer.rb:62:in `run'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/site.rb:479:in `render_regenerated'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/site.rb:472:in `block in render_pages'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/site.rb:471:in `each'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/site.rb:471:in `render_pages'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/site.rb:192:in `render'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/site.rb:71:in `process'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/command.rb:28:in `process_site'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/commands/build.rb:65:in `build'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/commands/build.rb:36:in `process'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:93:in `block in start'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:93:in `each'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:93:in `start'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/gems/jekyll-3.8.7/exe/jekyll:15:in `<top (required)>'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/bin/jekyll:23:in `load'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/bin/jekyll:23:in `<main>'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/bin/ruby_executable_hooks:24:in `eval'
from /Users/adammorgan/.rvm/gems/ruby-2.4.9/bin/ruby_executable_hooks:24:in `<main>'
Reading that trace, I understand the issue is happening here but I'm not exactly sure how to fix this? (repo link)
Any ideas?
I finally got this working but I took a different approach rather than solving the --safe flag issue.
Instead, I now have two branches. One is for normal Jekyll development locally and the other is for pushing to GitHub pages (only the _site directory).
The entire process for that is outlined here.

Rails 4: Use MySql and MongoDB together

I'm trying to make an application in rails 4 using MongoDB(mongoid) and MySQL together.
But I'm not able to set it up.
I'm following the steps below:
rails new myapp -d mysql
Then added these lines to Gemfile:
gem "mongoid"
gem "bson_ext"
bundle install
rails g mongoid:config
The step 4 fails. I'm not able to figure out the problem. It shows the following error.
/home/devesh/.rvm/gems/ruby-2.2.2/gems/mongoid-1.0.6/lib/mongoid/associations.rb:5:in require': /home/devesh/.rvm/gems/ruby-2.2.2/gems/mongoid-1.0.6/lib/mongoid/associations/has_many.rb:79: syntax error, unexpected keyword_do_cond, expecting ':'
#documents = attributes ? attributes.collect do |attrs|
^
/home/devesh/.rvm/gems/ruby-2.2.2/gems/mongoid-1.0.6/lib/mongoid/associations/has_many.rb:84: syntax error, unexpected ':', expecting keyword_end
end : []
^
/home/devesh/.rvm/gems/ruby-2.2.2/gems/mongoid-1.0.6/lib/mongoid/associations/has_many.rb:99: syntax error, unexpected keyword_do_cond, expecting keyword_end
attributes.values.each do |attrs|
^
/home/devesh/.rvm/gems/ruby-2.2.2/gems/mongoid-1.0.6/lib/mongoid/associations/has_many.rb:139: syntax error, unexpected keyword_end, expecting end-of-input (SyntaxError)
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/mongoid-1.0.6/lib/mongoid/associations.rb:5:in'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/mongoid-1.0.6/lib/mongoid.rb:40:in require'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/mongoid-1.0.6/lib/mongoid.rb:40:in'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in require'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:inblock (2 levels) in require'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in each'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:inblock in require'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in each'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:inrequire'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/bundler-1.10.6/lib/bundler.rb:134:in require'
from /home/devesh/fashion_hub/store/config/application.rb:7:in'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:82:in require'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:82:inpreload'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:143:in serve'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:131:inblock in run'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:125:in loop'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application.rb:125:inrun'
from /home/devesh/.rvm/gems/ruby-2.2.2/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in <top (required)>'
from /home/devesh/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire'
from /home/devesh/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
I was following this url.
Some details:
OS - ubuntu 14.04
ruby v2.2.2
rails 4.2.3
add these line to your application.rb file:
config.generators do |g|
g.orm :active_record
end
This will force rails g to use active record.
And whenever you want to generate a model for mongodb, use:
rails g mongoid:model yourmodelname

OpenShift rhc app create (Errno::EMSGSIZE)

I want to create WebSocket java application using this tutorial: https://blog.openshift.com/deploy-websocket-web-applications-with-jboss-wildfly/ . I created account, installed ruby, git, rhc, logged in successfully, created key, domain. I should create app then. rhc app create wildfly diy command causes error and this console output:
Using diy-0.1 (Do-It-Yourself 0.1) for 'diy'
Application Options
-------------------
Domain: weedteam
Cartridges: diy-0.1
Gear Size: default
Scaling: no
Creating application 'wildfly' ... done
Disclaimer: This is an experimental cartridge that provides a way to try unsupported languages, frameworks, and middleware on OpenShift.
Waiting for your DNS name to be available ... D:/Ruby22/lib/ruby/2.2.0/resolv.rb
:759:in `recvfrom': Komunikat wys│any na gniazdo datagramu by│ wiŕkszy ni┐ wewnŕ
trzny bufor lub przekracza│ inny sieciowy limit albo bufor u┐ywany do odbierania
datagramˇw by│ mniejszy ni┐ sam datagram. - recvfrom(2) (Errno::EMSGSIZE)
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:759:in `recv_reply'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:690:in `request'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:528:in `block in fetch_resource'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1096:in `block (3 levels) in res
olv'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1094:in `each'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1094:in `block (2 levels) in res
olv'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1093:in `each'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1093:in `block in resolv'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1091:in `each'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:1091:in `resolv'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:519:in `fetch_resource'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:509:in `each_resource'
from D:/Ruby22/lib/ruby/2.2.0/resolv.rb:500:in `getresources'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/helpers.rb:43
4:in `host_exists?'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:675:in `block in dns_propagated?'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:674:in `upto'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:674:in `dns_propagated?'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:201:in `block in create'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/highline_exte
nsions.rb:190:in `call'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/highline_exte
nsions.rb:190:in `section'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/highline_exte
nsions.rb:204:in `paragraph'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/helpers.rb:33
7:in `block (2 levels) in <module:Helpers>'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands/app.
rb:199:in `create'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands.rb:2
94:in `execute'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/commands.rb:2
85:in `block (3 levels) in to_commander'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/co
mmand.rb:180:in `call'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/co
mmand.rb:180:in `call'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/co
mmand.rb:155:in `run'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/ru
nner.rb:419:in `run_active_command'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/command_runne
r.rb:72:in `run!'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/de
legates.rb:8:in `run!'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/lib/rhc/cli.rb:37:in
`start'
from D:/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.4/bin/rhc:20:in `<top (
required)>'
from D:/Ruby22/bin/rhc:23:in `load'
from D:/Ruby22/bin/rhc:23:in `<main>'
When I check on the website, the app is created and running, but I can't proceed to the next step of this tutorial
$ cd wildfly
$ rhc app stop --app wildfly
$ git rm diy/index.html
$ git rm diy/testrubyserver.rb
cd wildfly is not working, rhc app stop --app wildfly stops app (as it should), and another 2 commands can't find repo. I think it's because create app command should do something more, but it was interrupted by this error. Am I wrong? What can I do to stop this error from happening?

Can I have non-html/md files in a rendered collection?

I have a writing collection in my Jekyll site, and I have output set to true, because I want all the .md and .html files rendered. However, there are some .js and .css files as well, which I'd like Jekyll to just serve up as normal.
I'm getting this error
undefined method `data' for #<Jekyll::StaticFile:0x00000104d8bb70>
and I believe it's because Jekyll is trying to parse out the js/css files.
Is it possible to have static files served up normally within my collections?
Update Here's the full trace:
Configuration file: project/_config.yml
Source: project
Destination: project/_site
Generating...
Unable to find a valid configuration: sass_path=project/_compass
~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.6.2/lib/jekyll-redirect-from/redirector.rb:38:in `has_alt_urls?': undefined method `data' for #<Jekyll::StaticFile:0x000001035f8f58> (NoMethodError)
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.6.2/lib/jekyll-redirect-from/redirector.rb:14:in `block in generate_alt_urls'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.6.2/lib/jekyll-redirect-from/redirector.rb:13:in `each'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.6.2/lib/jekyll-redirect-from/redirector.rb:13:in `generate_alt_urls'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.6.2/lib/jekyll-redirect-from/redirector.rb:9:in `generate'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/site.rb:251:in `block in generate'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/site.rb:250:in `each'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/site.rb:250:in `generate'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/site.rb:45:in `process'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/command.rb:28:in `process_site'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:55:in `build'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:33:in `process'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:17:in `block (2 levels) in init_with_program'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `call'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `block in execute'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `each'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `execute'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/program.rb:35:in `go'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary.rb:22:in `program'
from ~/.rvm/rubies/ruby-2.1.1/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/bin/jekyll:18:in `<top (required)>'
from ~/.rvm/gems/ruby-2.1.1/bin/jekyll:23:in `load'
from ~/.rvm/gems/ruby-2.1.1/bin/jekyll:23:in `<main>'
from ~/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
from ~/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
You normally should be able to use static files in collection but there is a jekyll-redirect 0.6.2 bug (ticket is here).
Workarounds
1. use Github pages configuration
If you plan to serve your site from Github pages, you will need to add a Gemfile with
source 'https://rubygems.org'
gem 'github-pages'
Then do a bundle update. This will resolve the problem as Jekyll-redirect 0.3.1 doesn't try to make redirect for collections.
2. Move your static files
Move your static files out of your collection folder to avoid the bug with collections static files.
3. Remove redirect plugin
If you don't need it or need it just for one or two pages, remove it from you Gemfile and craft needed redirect page by copying redirect pages.

Can't get buildr to run checkstyle

I've been trying to get buildr to run checkstyle.
I've added the requirement as
require 'buildr/checkstyle'
But when I run
buildr checkstyle:html
I get this (with trace)
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task_manager.rb:49:in `[]'
/var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:115:in `invoke_task'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:238:in `block (2 levels) in top_level'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:238:in `each'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:238:in `block in top_level'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:535:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:230:in `top_level'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:131:in `block in run'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:535:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/lib/buildr/core/application.rb:128:in `run'
/var/lib/gems/1.9.1/gems/buildr-1.4.16/bin/buildr:20:in `<top (required)>'
/usr/local/bin/buildr:23:in `load'
/usr/local/bin/buildr:23:in `<main>'
Any idea what I have missed?
A few things to note. The checkstyle targets are added to the project in which they are defined. So if you create a project like
require 'buildr/checkstyle'
define "foo" do
project.version = "1.0.0"
checkstyle.config_directory = _('etc/checkstyle')
end
Then you will need to invoke the buildr task "buildr foo:checkstyle:html". It should be noted that it is not enough to simply add the require to the buildfile, you also need to supply a configuration file listing the checks. By default this located in the configuration directory with a name of "checks.xml" so for the above example you would need to place the checkstyle configuration file at "etc/checkstyle/checks.xml".
Versions of buildr prior to 1.4.17 also require that you specify an xsl stylesheet if you want to generate a html report. This defaults to the name "checkstyle-report.xsl" in the configuration directory but from buildr versions 1.4.17 onwards, buildr supplies it's own version of the xsl.