I'm trying to code for an sms server using the following tutorial.
http://lukeredpath.co.uk/blog/sending-sms-messages-from-your-rails-application.html
Here they advice us to use clickatell but i have a gateway that i can use which i would like to use. However i wouldn't know how to write the bits of code that says require clickatell or sudo gem install clickatell. I'm new to ruby and rails hence any help would be appreciated :)
In Gemfile:
gem 'clickatell`
Then run bundle install.
Related
I am trying to run the rails server on windows instance (I am using gitbash). I already install ruby (1.9.3), rails(4.2.0) and gem (1.8.29). I have took a screen shots of my error and my Gemfiles so you guys can look at it. I dig into the error and it seems like PTY files which are required on the slave.rb files is not supported on the windows! Does anyone know the way around this problem?
Thanks!
To solve this for the time being comment out the web-console gem as this has reference to the pty gem but please take note of my comment on your question
# gem 'web-console'
You might then want to run bundle install again
I am very new to programming and I have been doing a lot of research for how to incorporate the Elasticsearch-rails gem into my apps. However, I have come to a point where I don't know how to get it up and running within my app. This is what I've done so far.
put gem 'elasticsearch', '~> 1.0.5' in my gemfile.
typed gem install elasticsearch in terminal
Now I see that I need to put the following code into my app files, but I'm not sure where it goes:
require 'elasticsearch'
And then what do I do with this code?:
client = Elasticsearch::Client.new log: true
client.transport.reload_connections!
client.cluster.health
client.search q: 'test'
# etc.
Also, I'm confused about the difference between the following gems:
gem 'elasticsearch', '~> 1.0.5
https://github.com/elasticsearch/elasticsearch-ruby
gem install elasticsearch-model elasticsearch-rails
https://github.com/elasticsearch/elasticsearch-rails
https://github.com/elasticsearch/elasticsearch-rails/tree/master/elasticsearch-model
Are the elasticsearch-model and elasticsearch-rails already in elasticsearch-ruby?
In some tutorials I see it mentioned that you need to install elasticsearch on your computer and then navigate to http://localhost:9200 to see if it's up and running. Can't I just have it run within my app instead of having it run on my computer?
Thanks in advance for any insight you can provide me.
The code you are referring to is to connect and interact with your Elasticsearch server. Before you can do that you need to have Elasticsearch installed. You can think of Elasticsearch as its own webserver wrapped around a search engine that responds to a REST API.
Elasticsearch cannot run within your application. It needs to run on it's own. The easiest way to install Elasticsearch is to use Homebrew. With one command line you can install and have Elasticsearch running, it's really easy.
Once you have Elasticsearch running, you'll want to use the 'elasticsearch-model' gem, as that will be the interface between your application and Elasticsearch. The 'elasticsearch-rails' gem will handle rake tasks, and the 'elasticsearch-persistence' gem will handle ruby objects, which is not required if you are using Rails.
I hope this answered your questions. I just wrote an article on everything I covered in this answer at http://aaronvb.com/articles/intro-to-elasticsearch-ruby-on-rails-part-1.html
i have installed nifty_generators successfully. Though, when i run the following command:
rails generate nifty_authentication
i get the error:
Could not find generator nifty_authentication.
I have included gem 'nifty_generators' in my gem file. What is the error?
Couple of things after looking on its github.
First, I believe the gem is call nifty-generators not nifty_generators, which may be causing you some other problems as well.
Second, per the instructions , you should be calling it via rails g nifty:authentication.
I am new to rails platform. I am developing a simple applicatoin in which I want to import all my gmail contacts. I Came to know that I can use cardmagic gem for importing contacts. It is given on link below.
https://github.com/cardmagic/contacts.git
I want to know how to integrate it in my application.I am trying to install it using
gem install contact
Then I did
bundle install
&
bundle update
Both commands executed without error still am not getting whether the gem is installed or not.I checked gemfile to check its entry.It is not there.
Please guide me whether I am going right or not & also tell me how can I use its functionality.
Please also tell me about good resources that will elaborate more about gems & their uses.
Thank you
If you're using Bundler, you need to add the gem to your Gemfile, and not install it with gem install contact.
If you look at the RubyGems page for contacts you can see how they recommend adding it:
gem "contacts", "~> 1.2.4"
Once it's in your Gemfile, just run bundle from within your application directory and it will install it.
I am newbie to Ruby on Rails and I would like to install "Spreecommerce". Could I have some help on doing this? I don't know where to start. Any help will be highly appreciable, thanks!
You are talking about Spreecommerce. Next time, try to add a link to the project/gem/plugin you are talking about.
Install the gem, on the command line like this:
gem install spree
Or, go to the Gemfile of your project and add the following line:
gem 'spree'
Then type this in the command line:
bundle install
Then, go to the official github page and read the documentation of this gem to get more information about it and how to use it. There is also this official getting started page that you need to read.