Comments (8)
while trying to run rails console (the project inculeds feedzirra stuff) on rails 3, I get the following error in loofah:
user@host:~/my_rails_project$ rails server
/home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta/lib/rails.rb:40:in configuration': undefined method
config' for nil:NilClass (NoMethodError)
from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/loofah-0.4.7/lib/loofah.rb:89:in <top (required)>' from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in
require'
from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in block in require' from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:537:in
new_constants_in'
from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in require' from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/feedzirra-0.0.23/lib/feedzirra.rb:6:in
<top (required)>'
from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.13/lib/bundler/runtime.rb:45:in require' from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.13/lib/bundler/runtime.rb:45:in
block (2 levels) in require'
from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.13/lib/bundler/runtime.rb:40:in each' from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.13/lib/bundler/runtime.rb:40:in
block in require'
from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.13/lib/bundler/runtime.rb:39:in each' from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.13/lib/bundler/runtime.rb:39:in
require'
from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/bundler-0.9.13/lib/bundler.rb:73:in require' from /home/myHome/my_rails_project/config/application.rb:6:in
<top (required)>'
from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta/lib/rails/commands.rb:36:in require' from /home/myHome/.rvm/gems/ruby-1.9.1-p378/gems/railties-3.0.0.beta/lib/rails/commands.rb:36:in
<top (required)>'
from /home/myHome/my_rails_project/script/rails:10:in require' from /home/myHome/my_rails_project/script/rails:10:in
Hope you can fix this soon.
from loofah.
I believe there is a hack to get around the error but this is no solution ATM: http://www.mythoughtpot.com/2010/02/10/feedzirra-on-rails3/
from loofah.
possibly-relevant link: https://gist.github.com/9fcf658fc4f559b97c2c
from loofah.
Hey all, think I have a proper fix for this. Added a railtie, and some conditional logic to to load it in rails 3: http://github.com/technicalpickles/loofah
from loofah.
Howdy. I'll take a look, but I don't see any tests for Rails 3 in your repo :) That's actually what I'm dragging my feet on. If you're interested, you can take a look at the rails_test subdirectory for how I attempted (badly) to workaround gem paths in the pre-bundler era.
from loofah.
Hey, ignore that comment. I'm going to rewrite the rails test suite using bundler and hope that I'm not going to be testing bundler itself on older versions of rails. Josh -- thanks for the railtie work.
from loofah.
Thanks Josh, your solution is working.
Mike -- looking forward to the "official" support for Rails 3.
from loofah.
I've merged Josh's changes into the new gem, 'loofah-activerecord' 1.0.0.beta.1, which is Rails 3 compatible. See http://github.com/flavorjones/loofah-activerecord
Also see http://librelist.com/browser//loofah/2010/7/18/thoughts-on-splitting-up-the-loofah-gem/ for rationale on the new gem.
from loofah.
Related Issues (20)
- A whitespace handling change in v2.9.0 is breaking a test in our code HOT 1
- `#text` should only render HTML elements HOT 1
- explore testing with the portswigger xss cheat sheet exploits
- `#to_text` doesn't handle `<br>` elements well. HOT 4
- Adding sms to ACCEPTABLE_PROTOCOLS HOT 3
- tests fail with latest versions of dependencies HOT 1
- Loofah removes HOT 3
- HTML5 empty attributes are being scrubbed HOT 5
- CSS Scrubber is removing the builtin extended CSS color properties in `>= v2.9.0` HOT 5
- RFC: should Loofah sanitize `<style>` tag contents HOT 2
- Preserving emails that look like tags HOT 2
- loofah issue with recent CVE release HOT 2
- unclosed html tags are also being pruned off, ideal expectation is to have only closed tags pruned HOT 12
- Getting errors using Nokogiri < 1.12 HOT 11
- pass encode_special_chars to to_s HOT 1
- Whitespace Added around "/" in CSS HOT 3
- Add scrub to append `target=_blank` to all links HOT 3
- Built-in scrubbers don't escape unsafe HTML with Nokogiri > 1.15 HOT 2
- feat: encapsulate some whitespace-handling into a scrubber (or scrubbers) HOT 3
- placeholder: when Nokogiri 1.17 is released, use the `parse_noscript_content_as_text` option by default
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 loofah.