Comments (2)
Add rake
into Gemfile fix this.
I am wonder why seldom to see add `rake' into Gemfie, anywhy, it worked.
from opal-rspec.
@elia ,
This issue still happen in Opal 0.11, we have to add rake
with opal-rspec
together into Gemfile
, to make opal-rspec
to work.
Following is a simple example:
# Gemfile
source 'https://rubygems.org'
# gem 'rake'
gem 'opal'
gem 'opal-sprockets', require: false
gem 'opal-jquery', github: 'opal/opal-jquery'
gem 'opal-rspec
# config.ru
require 'bundler'
Bundler.require
require 'opal/sprockets/server'
run Opal::Sprockets::Server.new {|s|
s.append_path 'app'
s.append_path 'js'
s.main = 'application'
# This can be used to provide a custom index file.
s.index_path = 'index.html.erb'
}
When I run rackup
in project root, got:
/home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal/rspec/post_rack_locator.rb:1:in `require': cannot load such file -- rake (LoadError)
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal/rspec/post_rack_locator.rb:1:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal/rspec/cached_environment.rb:2:in `require'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal/rspec/cached_environment.rb:2:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal/rspec/sprockets_environment.rb:3:in `require'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal/rspec/sprockets_environment.rb:3:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal/rspec.rb:4:in `require'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal/rspec.rb:4:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal-rspec.rb:1:in `require'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/opal-rspec-0.6.1/lib/opal-rspec.rb:1:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-2.3.3@global/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `require'
from /home/zw963/.rvm/gems/ruby-2.3.3@global/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
from /home/zw963/.rvm/gems/ruby-2.3.3@global/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
from /home/zw963/.rvm/gems/ruby-2.3.3@global/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
from /home/zw963/.rvm/gems/ruby-2.3.3@global/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
from /home/zw963/.rvm/gems/ruby-2.3.3@global/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
from /home/zw963/.rvm/gems/ruby-2.3.3@global/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
from /home/public/Dropbox/others/Project/opal/0.10.5/conway_gol/config.ru:2:in `block in <main>'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/builder.rb:55:in `instance_eval'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/builder.rb:55:in `initialize'
from /home/public/Dropbox/others/Project/opal/0.10.5/conway_gol/config.ru:in `new'
from /home/public/Dropbox/others/Project/opal/0.10.5/conway_gol/config.ru:in `<main>'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/builder.rb:49:in `eval'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/builder.rb:49:in `new_from_string'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/builder.rb:40:in `parse_file'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/server.rb:319:in `build_app_and_options_from_config'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/server.rb:219:in `app'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/server.rb:354:in `wrapped_app'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/server.rb:283:in `start'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/lib/rack/server.rb:148:in `start'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/gems/rack-2.0.3/bin/rackup:4:in `<top (required)>'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/bin/rackup:22:in `load'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/bin/rackup:22:in `<main>'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/bin/ruby_executable_hooks:15:in `eval'
from /home/zw963/.rvm/gems/ruby-2.3.3@conway_gol/bin/ruby_executable_hooks:15:in `<main>'
Thought this issue could be resolved by add gem 'rake'
into my Gemfile, but, this annoy me a lot
for me, i think same situation for those newbie to Opal.
Anywhy, i think this could be resolved by opal-rspec
, right?
Following is my example project: https://github.com/zw963/conway_gal
from opal-rspec.
Related Issues (20)
- Compiler/Line Number Metadata HOT 4
- Performance Improvement Ideas HOT 4
- issues with opal 0.10.0 HOT 4
- Results Reporting Sync/Async HOT 1
- filter_run_excluding not working? HOT 1
- how to require gem or a source file ? HOT 5
- stub_const doesn't work quite the same in opal 0.9 HOT 9
- Opal-Master Compatibility
- Sprockets HOT 1
- Support random order HOT 2
- Opal::RSpec::RakeTask HOT 4
- `expect_any_instance_of` is not working when using opal master HOT 5
- Trying to run phantomjs or in-browser tests throws Sprockets::FileNotFound HOT 3
- Could not found jquery when use node as task runner. HOT 1
- spec not worked with opal 0.11. (chrome headless) HOT 11
- Unable to require 'nodejs' in spec HOT 2
- uninitialized constant OPAL_PLATFORM HOT 8
- Headless Chrome support HOT 3
- Can you release a new version? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opal-rspec.