Hi Everyone,

I am pretty new to Rails. I have very little idea about everything. But
for my new project i have been asked to do some research on Solr search
and implement it on Rails. Please provide me some link on tutorials and
guides about Solr on Rails. Trouble is... have to do it by tomorrow.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Everaldo Gomes at Dec 2, 2011 at 12:44 pm
    Hi!

    Take a look at:

    http://railscasts.com/episodes/278-search-with-sunspot
    On Fri, Dec 2, 2011 at 10:13 AM, Somnath Mallick wrote:

    Hi Everyone,

    I am pretty new to Rails. I have very little idea about everything. But
    for my new project i have been asked to do some research on Solr search
    and implement it on Rails. Please provide me some link on tutorials and
    guides about Solr on Rails. Trouble is... have to do it by tomorrow.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Somnath Mallick at Dec 2, 2011 at 1:11 pm
    Ok.... So Sunspot and solr is one and the same thing?

    I tried this example...
    http://techbot.me/2011/01/full-text-search-in-in-rails-with-sunspot-and-solr/


    but when i run it i get the exception:

    $ rake sunspot:solr:run
    Requiring REXML
    The syntax of the command is incorrect.
    rake aborted!
    You need a Java Runtime Environment to run the Solr server

    Tasks: TOP => sunspot:solr:run
    (See full trace by running task with --trace)


    Any solution to this? I have JDK 1.7 installed with PATH variable
    properly set.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Everaldo Gomes at Dec 2, 2011 at 1:14 pm

    On Fri, Dec 2, 2011 at 11:10 AM, Somnath Mallick wrote:

    Ok.... So Sunspot and solr is one and the same thing?
    I guess Solr is the fulltext engine (in java) and sunspot is a rubygem
    which "wraps" access to solr.

    I tried this example...

    http://techbot.me/2011/01/full-text-search-in-in-rails-with-sunspot-and-solr/


    but when i run it i get the exception:

    $ rake sunspot:solr:run
    Requiring REXML
    The syntax of the command is incorrect.
    rake aborted!
    You need a Java Runtime Environment to run the Solr server

    Tasks: TOP => sunspot:solr:run
    (See full trace by running task with --trace)


    Any solution to this? I have JDK 1.7 installed with PATH variable
    properly set.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Hassan Schroeder at Dec 2, 2011 at 3:46 pm

    On Fri, Dec 2, 2011 at 5:10 AM, Somnath Mallick wrote:

    rake aborted!
    You need a Java Runtime Environment to run the Solr server
    Any solution to this? I have JDK 1.7 installed
    Uh, "JDK 1.7" ??? -- what is the output of

    java -version
    echo $JAVA_HOME
    echo $JRE_HOME

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Dheeraj Kumar at Dec 2, 2011 at 5:42 pm
    First, make sure java is installed properly by Hassan Schroeder's post.
    Then, download and set up Solr.
    Then, install the sunspot gem

    Then, RTFM. This entire post could have been avoided then...

    Dheeraj Kumar

    On Friday 2 December 2011 at 9:16 PM, Hassan Schroeder wrote:
    On Fri, Dec 2, 2011 at 5:10 AM, Somnath Mallick (mailto:lists@ruby-forum.com)> wrote:

    rake aborted!
    You need a Java Runtime Environment to run the Solr server
    Any solution to this? I have JDK 1.7 installed
    Uh, "JDK 1.7" ??? -- what is the output of

    java -version
    echo $JAVA_HOME
    echo $JRE_HOME

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com (mailto:hassan.schroeder@gmail.com)
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com (mailto:rubyonrails-talk@googlegroups.com).
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com (mailto:rubyonrails-talk+unsubscribe@googlegroups.com).
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Joelson Abreu at Dec 3, 2011 at 2:12 am
    http://www.wowebook.pro/book/apache-solr-3-enterprise-search-server

    ---
    Joelson de Abreu
    joeferrugem@hotmail.com
    (48) 9902-2800

    On Fri, Dec 2, 2011 at 3:42 PM, Dheeraj Kumar wrote:

    First, make sure java is installed properly by Hassan Schroeder's post.
    Then, download and set up Solr.
    Then, install the sunspot gem

    Then, RTFM. This entire post could have been avoided then...

    Dheeraj Kumar

    On Friday 2 December 2011 at 9:16 PM, Hassan Schroeder wrote:

    On Fri, Dec 2, 2011 at 5:10 AM, Somnath Mallick wrote:

    rake aborted!
    You need a Java Runtime Environment to run the Solr server


    Any solution to this? I have JDK 1.7 installed


    Uh, "JDK 1.7" ??? -- what is the output of

    java -version
    echo $JAVA_HOME
    echo $JRE_HOME

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.


    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Somnath Mallick at Dec 2, 2011 at 1:33 pm
    Any workaround for the exception???

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Everaldo Gomes at Dec 2, 2011 at 1:41 pm

    On Fri, Dec 2, 2011 at 11:33 AM, Somnath Mallick wrote:

    Any workaround for the exception???
    You have to install Solr. =)

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to
    rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Somnath Mallick at Dec 3, 2011 at 7:51 am
    The output of java -version is:

    java version "1.7.0_01"
    Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
    Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)

    echo $JAVA_HOME is:
    $ echo $JAVA_HOME
    C:\Program Files\Java\jdk1.7.0_01

    I dont have a JRE_HOME variable set. Is that really needed?

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Somnath Mallick at Dec 3, 2011 at 8:29 am
    Right now... I have installed Solr and am able to start it using Tomcat.

    I can see the Solr Admin page (attached sreenshot). But still i get the
    above error mentioned. running the command with --trace gives me this:

    $ rake sunspot:solr:run --trace
    Requiring REXML
    ** Invoke sunspot:solr:run (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    ** Execute sunspot:solr:run
    The syntax of the command is incorrect.
    rake aborted!
    You need a Java Runtime Environment to run the Solr server
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/server.rb:202:in
    `ensure_java_installed'
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/server.rb:27:in
    `initialize'
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/tasks.rb:23:in `new'
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/tasks.rb:23:in
    `block (3 levels) in <top (required)>'
    c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `call'
    c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
    c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `each'
    c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
    c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:158:in `block in
    invoke_with_call_chain'
    c:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
    c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
    c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in
    top_level'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `each'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in
    `standard_exception_handling'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in
    `standard_exception_handling'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:63:in `run'
    c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top
    (required)>'
    c:/Ruby193/bin/rake:19:in `load'
    c:/Ruby193/bin/rake:19:in `<main>'
    Tasks: TOP => sunspot:solr:run

    Attachments:
    http://www.ruby-forum.com/attachment/6806/Solr.JPG


    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Hassan Schroeder at Dec 3, 2011 at 3:42 pm

    On Sat, Dec 3, 2011 at 12:28 AM, Somnath Mallick wrote:

    I can see the Solr Admin page (attached sreenshot). But still i get the
    above error mentioned. running the command with --trace gives me this:

    $ rake sunspot:solr:run --trace ...
    rake aborted!
    You need a Java Runtime Environment to run the Solr server
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/server.rb:202:in
    `ensure_java_installed'
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/server.rb:27:in
    `initialize'
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/tasks.rb:23:in `new'
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/tasks.rb:23:in
    If `java -version` works from the command line, it should work here,
    because that's what this gem is using to confirm Java is installed
    (lib/solr/sunspot/java.rb) --

    3 module Java
    4 def self.installed?
    5 `java -version &> /dev/null`
    6 $?.success?
    7 end

    But you're using Windows? What happens if you run the above
    command from a shell? Does CMD understand " &> /dev/null" ?

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Matt Jones at Dec 4, 2011 at 6:31 pm

    On Dec 3, 3:28 am, Somnath Mallick wrote:
    Right now... I have installed Solr and am able to start it using Tomcat.

    I can see the Solr Admin page (attached sreenshot). But still i get the
    above error mentioned. running the command with --trace gives me this:

    $ rake sunspot:solr:run --trace
    Requiring REXML
    ** Invoke sunspot:solr:run (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    ** Execute sunspot:solr:run
    The syntax of the command is incorrect.
    rake aborted!
    You need a Java Runtime Environment to run the Solr server
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/server.rb:202:in
    `ensure_java_installed'
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/server.rb:27:in
    `initialize'
    C:/Ruby193/gems/sunspot_solr-1.3.0/lib/sunspot/solr/tasks.rb:23:in `new'
    If you've got Solr working with Tomcat, then you won't need
    sunspot_solr (the packaged server) at all. All you need in that
    scenario is the files generated by:

    rails generate sunspot_rails:install

    and a correct config file in config/sunspot.yml. In particular, you
    may need to adjust the path value there to reflect your Tomcat config.

    --Matt Jones

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Somnath Mallick at Dec 6, 2011 at 3:07 pm
    From one problem to another! I got a ready-made project and trying to
    understand the code... And when i run the rake command i get:

    $ rake sunspot:solr:run --trace
    rake aborted!
    126: The specified module could not be found. -
    C:/Ruby193/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so
    C:/Ruby193/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in
    `require'
    C:/Ruby193/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in
    `<top (required)>'
    C:/Ruby193/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in `require'
    C:/Ruby193/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in `<top
    (required)>'
    C:/Ruby193/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
    C:/Ruby193/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2
    levels) in require'
    C:/Ruby193/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
    C:/Ruby193/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in
    require'
    C:/Ruby193/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
    C:/Ruby193/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
    C:/Ruby193/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
    c:/railscode/SunspotTutorial/config/application.rb:7:in `<top
    (required)>'
    c:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    c:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    c:/railscode/SunspotTutorial/Rakefile:4:in `<top (required)>'
    c:/Ruby193/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load'
    c:/Ruby193/lib/ruby/1.9.1/rake/rake_module.rb:25:in `load_rakefile'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:501:in `raw_load_rakefile'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:82:in `block in
    load_rakefile'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in
    `standard_exception_handling'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:81:in `load_rakefile'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:65:in `block in run'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in
    `standard_exception_handling'
    c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:63:in `run'
    c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:32:in `<top
    (required)>'
    c:/Ruby193/bin/rake:19:in `load'
    c:/Ruby193/bin/rake:19:in `<main>'


    I think Solr and me are not meant to be! :(

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Hassan Schroeder at Dec 6, 2011 at 5:02 pm

    On Tue, Dec 6, 2011 at 7:07 AM, Somnath Mallick wrote:
    From one problem to another! I got a ready-made project and trying to
    understand the code... And when i run the rake command i get:

    $ rake sunspot:solr:run --trace
    rake aborted!
    126: The specified module could not be found.   -
    C:/Ruby193/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so
    C:/Ruby193/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in
    `require'
    I think Solr and me are not meant to be! :(
    It appears you have a MySQL, not Solr, problem.

    You might want to create a new, bare Rails test app and make sure
    the basics work first...

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Somnath Mallick at Dec 7, 2011 at 2:58 pm
    Yeah I did do a fresh creation of a project and changed from MySQL to
    SQLite. And now i am back at Square 1...


    $ rake sunspot:solr:run
    Requiring REXML
    The syntax of the command is incorrect.
    rake aborted!
    You need a Java Runtime Environment to run the Solr server

    Tasks: TOP => sunspot:solr:run
    (See full trace by running task with --trace)

    By the way... I am on JDK 1.7, Win XP, Rails 3.1.3.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Hassan Schroeder at Dec 7, 2011 at 5:12 pm

    On Wed, Dec 7, 2011 at 6:58 AM, Somnath Mallick wrote:
    And now i am back at Square 1...

    $ rake sunspot:solr:run
    Requiring REXML
    The syntax of the command is incorrect.
    rake aborted!
    You need a Java Runtime Environment to run the Solr server
    And yet you still haven't answered my previous question...

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Somnath Mallick at Dec 8, 2011 at 8:46 am
    Just to add:

    java -version works from the command line.
    I tried running the command from GitBash console coz on CMD it doesn't
    work:
    java -version &> /dev/null

    And it does not throw and error of any sort.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Hassan Schroeder at Dec 8, 2011 at 4:33 pm

    On Thu, Dec 8, 2011 at 12:46 AM, Somnath Mallick wrote:

    java -version works from the command line.
    I tried running the command from GitBash console coz on CMD it doesn't
    work:
    java -version &> /dev/null

    And it does not throw and error of any sort.
    Not sure what "works" and "doesn't work" above mean, so let's do
    this; create a file, let's say java.rb with

    # start
    def java_installed?
    `java -version &> /dev/null`
    $?.success?
    end

    puts java_installed?
    # end

    Then run it from the command line, e.g. ruby java.rb

    Let's see what the output is.

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Somnath Mallick at Dec 8, 2011 at 7:27 pm
    Which one?? If you are talking about the CMD command then i don't think
    it would work. Those are commands that work on Unix. But i am using
    GitBash to run my commands. Which is like a Unix shell in Windows.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Hassan Schroeder at Dec 8, 2011 at 9:08 pm

    On Wed, Dec 7, 2011 at 2:15 PM, Somnath Mallick wrote:
    Which one?? If you are talking about the CMD command then i don't think
    it would work. Those are commands that work on Unix. But i am using
    GitBash to run my commands. Which is like a Unix shell in Windows.
    The question is what environment Rails is running in; if you're starting
    it from GitBash, does it execute system calls using that? I don't know
    and I can't test it.

    The sample code I provided is copied from the sunspot_solr check
    for a Java installation, so that's why I suggested trying it. You could
    certainly try debugging directly from that gem.

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 2, '11 at 12:13p
activeDec 8, '11 at 9:08p
posts21
users6
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase