I'm using Rails and the mysql2 gem. Is there a way to get the mysqld server version as running the command:
$ mysqld --version
mysqld Ver 5.5.29 for osx10.8 on i386 (Source distribution)
I do not wish to execute a shell command because the database server might be running on another server.
You can get the version info in rails via ActiveRecord::Base.connection. I'm doing it in my rails console here. I'm using an old version (2.2) of rails so the syntax might be different in yours.
irb(main):001:0> ActiveRecord::Base.connection.select_rows(
"SHOW VARIABLES LIKE '%version%'"
)
=> [
["innodb_version", "5.5.34"],
["protocol_version", "10"],
["slave_type_conversions", ""],
["version", "5.5.34-0ubuntu0.12.04.1"],
["version_comment", "(Ubuntu)"],
["version_compile_machine", "x86_64"],
["version_compile_os", "debian-linux-gnu"]
]
Once you've got this you can pull out the info you want, eg:
version = ActiveRecord::Base.connection
.select_rows("SHOW VARIABLES LIKE 'version'")
.last.last
=> "5.5.34-0ubuntu0.12.04.1"
def mysql_version
mysql_version_sql = 'SHOW VARIABLES WHERE Variable_name = "version"'
ActiveRecord::Base.connection.select_rows(mysql_version_sql)[0][1]
end
mysql_version #=> "5.5.35-0+wheezy1"
Related
I have a production server running ubuntu 14.04, Rails 4.2.0, postgresql 9.6.1 with gem pg 0.21.0/0.20.0. In last few days, there is constantly error with accessing to a table customer_input_datax_records in psql server.
D, [2017-07-20T18:08:39.166897 #1244] DEBUG -- : CustomerInputDatax::Record Load (0.1ms) SELECT "customer_input_datax_records".* FROM "customer_input_datax_records" WHERE ("customer_input_datax_records"."status" != $1) [["status", "email_sent"]]
E, [2017-07-20T18:08:39.166990 #1244] ERROR -- : PG::UnableToSend: no connection to the server
: SELECT "customer_input_datax_records".* FROM "customer_input_datax_records" WHERE ("customer_input_datax_records"."status" != $1)
The code which call to access the db server is with Rufus scheduler 3.4.2 loop:
s = Rufus::Scheduler.singleton
s.every '2m' do
new_signups = CustomerInputDatax::Record.where.not(:status => 'email_sent').all
.......
end
After restart the server, usually there is with first request (or a few). But after some time (ex, 1 or 2 hours), the issue starts to show up. But the app seems running fine (accessing records with read/write & creating new). There are some online posts about the error. However the problem seems not the one I am having. Before I re-install the psql server, I would like to get some ideas about what causes the no connection.
UPDATE: database.yml
production:
adapter: postgresql
encoding: unicode
host: localhost
database: wb_production
pool: 5
username: postgres
password: xxxxxxx
So, the error is "RAILS: PG::UnableToSend: no connection to the server".
That reminds me of Connection pool issue with ActiveRecord objects in rufus-scheduler
You could do
s = Rufus::Scheduler.singleton
s.every '2m' do
ActiveRecord::Base.connection_pool.with_connection do
new_signups = CustomerInputDatax::Record
.where.not(status: 'email_sent')
.all
# ...
end
end
digging
It would be great to know more about the problem.
I'd suggest trying this code:
s = Rufus::Scheduler.singleton
def s.on_error(job, error)
Rails.logger.error(
"err#{error.object_id} rufus-scheduler intercepted #{error.inspect}" +
" in job #{job.inspect}")
error.backtrace.each_with_index do |line, i|
Rails.logger.error(
"err#{error.object_id} #{i}: #{line}")
end
end
s.every '2m' do
new_signups = CustomerInputDatax::Record.where.not(:status => 'email_sent').all
# .......
end
As soon as the problem manifests itself, I'd look for the on_error full output in the Rails log.
This on_error comes from https://github.com/jmettraux/rufus-scheduler#rufusscheduleron_errorjob-error
As we discuss in the comments, the problem seems related to your rufus version.
I would suggest you to check out whenever gem and to invoke a rake task instead of calling directly the activerecord model.
It could be a good idea, however, to open an issue with the traceback of your error in the rufus-scheduler repo on github (just to let then know...)
I’m using Ruby on Rails 4.2.7 on Mac El Capitan and just installed the Tor browser (v 6.0.4). I fired up my Tor browser, have verified its running by viewing a couple of web pages, but using this gem — https://github.com/dryruby/tor.rb , when I run my script, Ruby doesn’t believe Tor is running
require 'tor'
...
puts "avaailble: #{Tor.available?}"
puts "version: #{Tor.version}"
Returns
avaailble: false
version:
Indeed, when I try and make a Tor request using the https://github.com/brunogh/tor_requests gem, the web page request returns immediately, leading me to believe the Tor network isn’t being used because in a Tor browser it takes much longer (here is the code I’m using to amen a web page request) …
uri = URI.parse(url)
Net::HTTP.SOCKSProxy('127.0.0.1', 9150).start(uri.host, uri.port) do |http|
f = http.get(uri.path)
end
How do I make my Ruby/Rails code connect to my locally running Tor network?
Edit: In respnse to the answer given, here is what I set my PATH and DYLD_LIBRARY_PATH variables to …
localhost:myproject davea$ echo $PATH
/usr/local/opt/coreutils/libexec/gnubin:/opt/local/bin:/opt/local/sbin:/Users/davea/.rvm/gems/ruby-2.3.0/bin:/Users/davea/.rvm/gems/ruby-2.3.0#global/bin:/Users/davea/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin/:/opt/gradle-2.7/bin:/opt/apache-maven-3.3.3/bin:/Users/ davea/.rvm/bin:/usr/local/mysql/bin:/Applications/TorBrowser.app/Contents/MacOS/Tor:/Users/davea/.rvm/bin:/usr/local/mysql/bin:/Applications/TorBrowser.app/Contents/MacOS/Tor
localhost:myproject davea$ echo $DYLD_LIBRARY_PATH
/Applications/TorBrowser.app/Contents/MacOS/Tor:/usr/local/mysql/lib:/usr/local/mysql/lib:
and here is ht output in my Rails console trying the commands listed …
localhost:myproject davea$ rails console
Running via Spring preloader in process 49987
Loading development environment (Rails 4.2.7.1)
2.3.0 :001 >
2.3.0 :002 > Tor::Config::CONFDIR = '/Applications/TorBrowser.app//Contents/MacOS/Tor'
(irb):2: warning: already initialized constant Tor::Config::CONFDIR
/Users/davea/.rvm/gems/ruby-2.3.0/gems/tor-0.1.2/lib/tor/config.rb:21: warning: previous definition of CONFDIR was here
=> "/Applications/TorBrowser.app//Contents/MacOS/Tor"
2.3.0 :003 > Tor.available?
Here is how you can make brunogh/tor_requests work with Tor Browser (easy):
require 'tor_requests'
Tor.configure do |config|
config.ip = "127.0.0.1"
config.port = "9150"
config.add_header('User-Agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0')
end
res = Tor::HTTP.get(URI('https://drew-phillips.com/ip-info/'))
p res.code
p res.body
To get dryruby/tor working involved a bit more work:
It depends on your ENV PATH variable to find the Tor binary and Tor browser has some libraries (at least on Linux) within it's path that aren't found if you try to execute it directly. Seems this should support allowing you to add the path in code instead of relying on PATH in my opinion.
Trying to run Tor Browser's tor binary from the console yields (more on this later, may not apply to Mac):
tor: symbol lookup error: tor-browser_en-US/Browser/TorBrowser/Tor/tor: undefined
symbol: evutil_secure_rng_set_urandom_device_file
Also, installing the Gem from source doesn't give us the latest version available on GitHub and there appears to be a fix to the version method that isn't included with the Gem version 0.1.2. Because of this I pulled the source and tell the program to load the Gem from a custom path.
The working code:
require 'rubygems'
$:.unshift "./tor/lib"
require 'tor'
Tor::Config::CONFDIR = '/home/me/tor-browser_en-US/Browser/TorBrowser/Data/Tor'
p Tor::Config::CONFDIR
p Tor.available?
p Tor.version
Now, in order to have it run successfully, you'll need to set your PATH and LD_LIBRARY_PATH (on Mac this is DYLD_LIBRARY_PATH I believe).
So I run the Ruby code like this:
PATH=/home/me/tor-browser_en-US/Browser/TorBrowser/Tor:$PATH \
LD_LIBRARY_PATH=/home/me/tor-browser_en-US/Browser/TorBrowser/Tor:$LD_LIBRARY_PATH \
ruby tor.rb
This puts Tor Browser as the first search path for binaries and libraries.
Then with this I was able to get the following output:
true
"0.2.8.6"
Hope that helps!
I am trying to connect to the XMLRPC API of a dokuwiki website.
I am successfully doing that from my own laptop, with a SSL connection, however, when I try to do it from my production server (which hosts both the wiki and the rails app from which the ruby code is executed), I run into a
Runtime Error
Wrong size. Was 163, should be 113
Here's how I initialize the connection :
#wiki = ::XMLRPC::Client.new3(
host: "wiki.example.com",
path: "/lib/exe/xmlrpc.php",
use_ssl: true)
# Temp Hack because SSL Fails
#wiki.instance_variable_get(:#http).instance_variable_set(:#verify_mode, OpenSSL::SSL::VERIFY_NONE)
end
#authenticated = false
authenticate!
end
def authenticate!
# Fails at below line :
#authenticated = #wiki.call("dokuwiki.login", ENV['WIKI_USER'], ENV['WIKI_PASSWORD'])
Rails.logger.info (#authenticated ? "Authenticated on Wiki !" : "Authentication failed on wiki !")
end
I've read many posts saying that there is a bug in the XMLRPC lib of Ruby. I was running ruby 2.1.5pxx on my laptop and ruby 1.9.xx at my server so I did a rvm install 2.1.5, yet the problem is still here
(btw, I assumed it was enough to do a rvm use 2.1.5 and then touch restart to restart my rails server, but how can I check which version of ruby it's using ?)
What is wrong ?
EDIT
On my laptop, I am running ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]
On my production server, I am running ruby-2.1.5 [ i686 ]
I tried another library, libxml-xmlrpc, and I get the following error when running the same command:
Net::HTTPBadResponse: wrong status line: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
But again, the same code is running fine with the default ruby xmlrpc client on my Windows + rubyx64 2.1.5, so I really don't get it!
Edit2 : I tried adding
#wiki.http_header_extra = { "accept-encoding" => "identity" }
But then I get a
Authorization failed. HTTP-Error: 401 Unauthorized
The first call #wiki.call("dokuwiki.login", "myUsr", "myPwd") worked, but apparently it failed to authenticate me (Of course I am still using the same login information that should work)
EDIT 3
After investigation, a successful login from any other computer than localhost will set a cookie like
#cookie="DokuWiki=[small string] ; [very big string]
Whereas if I do it on localhost :
I will write [...] for random strings
#cookie="[small string 2]=deleted; DokuWiki=[small string]; [very big string]"
So I have an extra variable info stored in my cookie, which is "[small string 2]=deleted;
I believe this is what makes my authentication fails. Anyone knows what this is ???
So this localhost connection was messing up with the cookie. Apparently, even the ruby library doesn't know why, and the "Wrong size" comes from this unexpected string [random string]=deleted added at the beginning of the cookie.
Unless someone can explain WHY such a string is added, I will accept my solution of simply adding
#wiki.http_header_extra = { "accept-encoding" => "identity" }
which removes the "Wrong size" error, then
if /deleted/.match(#wiki.cookie)
#wiki.cookie = #wiki.cookie.gsub(/.*deleted; /, '')
end
To remove the beginning of the cookie
After I install Rails and I run rails server for a cloned repository that runs on RoR I see:
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
Right before this I installed Rails which according to terminal was correctly installed.
The command I had run was sudo gem install rails -V. To which I get:
HEAD https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
HEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
GET https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
HEAD https://rubygems.org/specs.4.8.gz
302 Moved Temporarily
HEAD https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz
200 OK
GET https://rubygems.org/specs.4.8.gz
302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz
200 OK
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/README.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/akshaysurve.jpg
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/belongs_to.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/book_icon.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/bullet.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/chapters_icon.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/check_bullet.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/credits_pic_blank.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/csrf.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/edge_badge.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/favicon.ico
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/feature_tile.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/footer_tile.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/fxn.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/challenge.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/confirm_dialog.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/forbidden_attributes_for_new_post.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/form_with_errors.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/index_action_with_edit_link.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/new_post.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/post_with_comments.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/rails_welcome.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/routing_error_no_controller.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/routing_error_no_route_matches.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/show_action_for_posts.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/template_is_missing_posts_new.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/undefined_method_post_path.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/unknown_action_create_for_posts.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/getting_started/unknown_action_new_for_posts.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/grey_bullet.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/habtm.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/has_many.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/has_many_through.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/has_one.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/has_one_through.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/header_backdrop.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/header_tile.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/i18n/demo_html_safe.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/i18n/demo_localized_pirate.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/i18n/demo_translated_en.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/i18n/demo_translated_pirate.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/i18n/demo_translation_missing.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/i18n/demo_untranslated.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/1.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/10.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/11.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/12.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/13.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/14.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/15.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/2.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/3.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/4.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/5.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/6.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/7.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/8.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/callouts/9.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/caution.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/example.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/home.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/important.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/next.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/note.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/prev.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/README
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/tip.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/up.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/icons/warning.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/jaimeiniesta.jpg
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/nav_arrow.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/oscardelben.jpg
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/polymorphic.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/radar.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/rails4_features.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/rails_guides_kindle_cover.jpg
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/rails_guides_logo.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/rails_logo_remix.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/session_fixation.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/tab_grey.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/tab_info.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/tab_note.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/tab_red.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/tab_yellow.gif
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/tab_yellow.png
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/images/vijaydev.jpg
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/guides.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/jquery.min.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/responsive-tables.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushAppleScript.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushAS3.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushBash.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushColdFusion.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushCpp.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushCSharp.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushCss.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushDelphi.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushDiff.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushErlang.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushGroovy.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushJava.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushJavaFX.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushJScript.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushPerl.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushPhp.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushPlain.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushPowerShell.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushPython.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushRuby.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushSass.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushScala.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushSql.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushVb.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shBrushXml.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/javascripts/syntaxhighlighter/shCore.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/fixes.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/kindle.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/main.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/print.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/reset.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/responsive-tables.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/style.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shCore.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shCoreDefault.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shCoreDjango.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shCoreEclipse.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shCoreEmacs.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shCoreMDUltra.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shCoreMidnight.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shCoreRDark.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shThemeDefault.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shThemeDjango.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shThemeEclipse.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shThemeEmacs.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shThemeMDUltra.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shThemeMidnight.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shThemeRailsGuides.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/assets/stylesheets/syntaxhighlighter/shThemeRDark.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/bug_report_templates/action_controller_gem.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/bug_report_templates/action_controller_master.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/bug_report_templates/active_record_gem.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/bug_report_templates/active_record_master.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/CHANGELOG.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/assets/javascripts/application.js
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/assets/javascripts/comments.js.coffee
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/assets/javascripts/posts.js.coffee
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/assets/javascripts/welcome.js.coffee
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/assets/stylesheets/application.css
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/assets/stylesheets/comments.css.scss
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/assets/stylesheets/posts.css.scss
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/assets/stylesheets/welcome.css.scss
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/controllers/application_controller.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/controllers/comments_controller.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/controllers/posts_controller.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/controllers/welcome_controller.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/helpers/application_helper.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/helpers/comments_helper.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/helpers/posts_helper.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/helpers/welcome_helper.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/models/comment.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/models/post.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/views/comments/_comment.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/views/comments/_form.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/views/layouts/application.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/views/posts/_form.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/views/posts/edit.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/views/posts/index.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/views/posts/new.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/views/posts/show.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/app/views/welcome/index.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/bin/bundle
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/bin/rails
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/bin/rake
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/application.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/boot.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/database.yml
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/environment.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/environments/development.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/environments/production.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/environments/test.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/initializers/backtrace_silencers.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/initializers/filter_parameter_logging.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/initializers/inflections.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/initializers/locale.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/initializers/mime_types.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/initializers/secret_token.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/initializers/session_store.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/initializers/wrap_parameters.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/locales/en.yml
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config/routes.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/config.ru
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/db/migrate/20130122042648_create_posts.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/db/schema.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/db/seeds.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/Gemfile
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/Gemfile.lock
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/public/404.html
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/public/422.html
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/public/500.html
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/public/favicon.ico
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/public/robots.txt
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/Rakefile
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/README.rdoc
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/controllers/comments_controller_test.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/controllers/posts_controller_test.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/controllers/welcome_controller_test.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/fixtures/comments.yml
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/fixtures/posts.yml
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/helpers/comments_helper_test.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/helpers/posts_helper_test.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/helpers/welcome_helper_test.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/models/comment_test.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/models/post_test.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/code/getting_started/test/test_helper.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/rails_guides/generator.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/rails_guides/helpers.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/rails_guides/indexer.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/rails_guides/kindle.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/rails_guides/levenshtein.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/rails_guides/markdown/renderer.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/rails_guides/markdown.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/rails_guides.rb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/Rakefile
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/2_2_release_notes.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/2_3_release_notes.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/3_0_release_notes.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/3_1_release_notes.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/3_2_release_notes.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/4_0_release_notes.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/_license.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/_welcome.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/action_controller_overview.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/action_mailer_basics.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/action_view_overview.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/active_model_basics.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/active_record_basics.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/active_record_callbacks.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/active_record_querying.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/active_record_validations.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/active_support_core_extensions.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/active_support_instrumentation.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/api_documentation_guidelines.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/asset_pipeline.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/association_basics.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/caching_with_rails.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/command_line.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/configuring.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/contributing_to_ruby_on_rails.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/credits.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/debugging_rails_applications.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/development_dependencies_install.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/documents.yaml
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/engines.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/form_helpers.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/generators.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/getting_started.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/i18n.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/index.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/initialization.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/kindle/copyright.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/kindle/KINDLE.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/kindle/layout.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/kindle/rails_guides.opf.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/kindle/toc.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/kindle/toc.ncx.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/kindle/welcome.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/layout.html.erb
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/layouts_and_rendering.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/maintenance_policy.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/migrations.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/nested_model_forms.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/plugins.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/rails_application_templates.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/rails_on_rack.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/routing.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/ruby_on_rails_guides_guidelines.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/security.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/testing.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/upgrading_ruby_on_rails.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/source/working_with_javascript_in_rails.md
/usr/local/lib/ruby/gems/2.0.0/gems/rails-4.0.1/guides/w3c_validator.rb
Successfully installed rails-4.0.1
Parsing documentation for rails-4.0.1
Parsing sources...
100% [260/260] guides/w3c_validator.rb
Done installing documentation for rails after 2 seconds
1 gem installed
Where am I wrong? I have Ruby 2.0.0 installed on my machine.
Can you let us know what this returns?
which rails
You should see something like this:
/Users/<user>/.rvm/gems/ruby-2.0.0-p247/bin
I am assuming you just need to update your PATH with the path to rails.
Make sure that you have something like this at the end of your login script (bash_login, etc):
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
This will ensure rvm is in your path.
Do you have to use sudo to install rails? If not, I would try installing without sudo.
Ok, I sorted it out myself, though the tough way as the railsinstaller doesn't work with Mavericks. Firstly, I uninstalled both rvm and homebrew doing that I accidentally deleted the ruby folder from my /User/bin folder too which deleted the default ruby package.
Now, I downloaded the source code from ruby-lang decompressed it and did a
./configure
make test
make install
which installed the package correctly. Since it was rvm, homebrew and macport clashing, I moved out the macport and used brew to upgrade my ruby install and finally download rails via
gem install rails
Install xcode before installing rails on your mac.
I've added the following to my gemfile:
gem 'texticle', "2.0", :require => 'texticle/rails' # search gem
I then ran bundle install and bundle installed the gem
I'm using Rails 3.1.0 and I have am using a Postgres database.
I verify that I actually have the string I am looking for in the database table:
ruby-1.9.2-p290 :004 > Hotel.first
Hotel Load (0.4ms) SELECT "hotels".* FROM "hotels" LIMIT 1
=> #<Hotel id: 1, title: "Marriot Hotel", created_at: "2012-03-01 23:53:16", updated_at: "2012-03-01 23:53:16">
When I run `Hotel.search('e')
ruby-1.9.2-p290 :005 > Hotel.search(:title => 'e')
Hotel Load (1.4ms) SELECT "hotels".*, ts_rank(to_tsvector("hotels"."title"), to_tsquery('e')) AS "rank0.4785527956789428" FROM "hotels" WHERE (to_tsvector('english', "title") ## to_tsquery('e')) ORDER BY "rank0.4785527956789428" DESC
=> []
I get nothing. I tried running Hotel.search('e') and still nothing. If I try Hotel.search(:title => 'Marriot') then it works but the reason I am using Texticle is for the fuzzy search.
Am I missing any other configurations?
Thanks
There are a couple things I would suggest checking:
Verify an extension has been created manually for each database involved. I didn't have luck with 'texticle:install_trigram'. And if you're using Heroku, there may be additional steps, especially if you haven't migrated from your shared database.
Use the fuzzy_search method. In the latest version of Texticle, there are actually 3 new methods; the original #search method has been deprecated.
To manually install the extension:
Local Dev/Test
psql -U <username>
\l
\c db_development
CREATE EXTENSION pg_trgm;
\dx
\c db_test
CREATE EXTENSION pg_trgm;
\dx
\q
Heroku Integration/Production
heroku pg:psql
\dx
CREATE EXTENSION pg_trgm;
\dx
More?
PostgreSQL Trigrams (fuzzy search)
What's new in PostgreSQL 9.1 - PostgreSQL wiki
trigram | Tumblr
Installing PostgreSQL Trigram
Install Trigram Rake Task by benhamill · Pull Request #63 · tenderlove/texticle · GitHub
texticle:install_trigram - on Heroku? · Issue #15 · tenderlove/texticle · GitHub
New Texticle search methods (source code)
texticle/lib/texticle.rb at master · texticle/texticle · GitHub
My understanding of the way Texticle works is that it's going to do full text search on your string columns but not necessarily do fuzzy search by default. If you look at the query that it's generating in Postgres, it's looking for a match on 'e' rather than any word that contains the letter 'e'.
You can read the Postgres docs here:
http://www.postgresql.org/docs/9.1/static/datatype-textsearch.html
That said, I see support for prefix matching but not postfix in the docs, although I might be missing something.
What happens if you do Hotel.search('Marr:*') ?