Skip to content

Instantly share code, notes, and snippets.

@bartlomiejdanek
Created February 14, 2013 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bartlomiejdanek/4953245 to your computer and use it in GitHub Desktop.
Save bartlomiejdanek/4953245 to your computer and use it in GitHub Desktop.
poc_constantize rails issue
➜ projects git clone git://github.com/stevo/poc_constantize.git
Cloning into 'poc_constantize'...
remote: Counting objects: 66, done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 66 (delta 2), reused 66 (delta 2)
Receiving objects: 100% (66/66), 26.54 KiB, done.
Resolving deltas: 100% (2/2), done.
➜ projects cd poc_constantize
➜ poc_constantize git:(master) rvm use 1.9.3@poc --create
Using /Users/bard/.rvm/gems/ruby-1.9.3-p385 with gemset poc
➜ poc_constantize git:(master) bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.0.3)
Installing i18n (0.6.1)
Installing multi_json (1.6.0)
Installing activesupport (3.2.12)
Installing builder (3.0.4)
Installing activemodel (3.2.12)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.5)
Installing rack-cache (1.2)
Installing rack-test (0.6.2)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.2.2)
Installing actionpack (3.2.12)
Installing mime-types (1.21)
Installing polyglot (0.3.3)
Installing treetop (1.4.12)
Installing mail (2.4.4)
Installing actionmailer (3.2.12)
Installing arel (3.0.2)
Installing tzinfo (0.3.35)
Installing activerecord (3.2.12)
Installing activeresource (3.2.12)
Installing coffee-script-source (1.4.0)
Installing execjs (1.4.0)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.3)
Installing json (1.7.7) with native extensions
Installing rdoc (3.12.1)
Installing thor (0.17.0)
Installing railties (3.2.12)
Installing coffee-rails (3.2.2)
Installing jquery-rails (2.2.1)
Installing pg (0.14.1) with native extensions
Using bundler (1.2.3)
Installing rails (3.2.12)
Installing sass (3.2.5)
Installing sass-rails (3.2.6)
Installing uglifier (1.3.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
➜ poc_constantize git:(master) git pull
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 7 (delta 2), reused 5 (delta 0)
Unpacking objects: 100% (7/7), done.
From git://github.com/stevo/poc_constantize
c23b09a..b85d5e9 master -> origin/master
Updating c23b09a..b85d5e9
Fast-forward
app/models/namespace1/namespace2/klass2.rb | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 app/models/namespace1/namespace2/klass2.rb
➜ poc_constantize git:(master) rails c
Loading development environment (Rails 3.2.12)
1.9.3p385 :001 > "Namespace1::Namespace2::Klass1".safe_constantize => Namespace1::Klass1
1.9.3p385 :002 > "Namespace1::Namespace2::Klass1".safe_constantize
=> nil
1.9.3p385 :003 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment