I am using the following gem for Google Visualizations https://github.com/jeremyolliver/gvis
I have followed the instructions for installation and usage on the page but I get the following error:
uninitialized constant ApplicationHelper::GoogleVisualization
How can I correct this error? I think it may be to do with restarting the server or rails but I'm not sure how to do this
Also what is the common plugin/gem or approach to using Google Visualizations with rails 3?
EDIT: I have now restarted my server and get the same error. One thing I noticed in the installation instructions is renaming the directory:
mv vendor/plugins/rails/rails-google-visualization-plugin vendor/plugins/google_visualization
The first line has a sub directory called rails within vendor/plugins, however this is not actually created when the plugin is installed. I am not sure if this is a typo error or not in the installation instructions
It's possible that you just need to restart your server. Open the console with your Mongrel or WEBrick running, and type Ctrl+C, and when it's done exiting, type rails s.
Related
I'm new here. I search everywhere and I haven't found anything. I'm using rails on windows 10. I'm following the basic tutorial of a sample app. When I execute "rails test" command in the console I get the following errors. I checked the permissions of each file and directory and all have the permissions needed. Can someone help me ?
I'm using rails 6.0.2.2 version.
Hope I'll get answer here.
Solution : I installed ubuntu on windows 10.
Stop your rails server before executing your tests: the server is keeping cache files locked and the testing framework is trying to alter them.
I encountered the same issue (while following what's probably the same tutorial you were following) on Rails 6.0.3.4 on Windows 10 and doing so solved it. (launching the server again before executing tests reproduced it again)
Update: I thought this was a complete solution, but it's more complex than that. Here's my experience:
running rails test while rails server is running results in the error;
running rails test when rails server is not running sometimes results in the error.
I haven't encountered this error on Linux so far, so my guess is that the implementation of Rails of Windows is unstable and sometimes gets stuck locking its own files.
You can check if you can reproduce the same behaviour, but I would report it as a bug.
I have a complete ruby project on my system that I downloaded from github.com and I want to run it on my Windows machine.
I have already installed Ruby and Rails on my system, but I have no idea how to run this project. The directory of this project is something like:
C:\Users\{username}\Desktop\BitcoinFundi\BitcoinFundi
How would I run this project on my system?
To run your Ruby on Rails application, use the following command:
rails server
This will start the server and you will be able to access the application in your browser at http://localhost:3000. Port 3000 is default and you can change it in the application settings.
To run a Ruby script use:
ruby name_of_script.rb
You should check out various resources and tutorials on getting started with rails.
As you say in your comment this is your first experience with Ruby on Rails, I think you should follow through chapter 1 and 2 (at least) of Ruby on Rails Tutorial. After that you should have a better understanding of how you start up a rails app and configure the DB. You also need a bunch of other libraries and software such as mysql from the sounds of it.
You should also read Getting Started with Rails. Section 4 covers how to start the default rails server.
Here is a guide on setting up a Rails environment for Windows, which is one of many guides, that shows you some of the needed steps to get a fully working environment.
Trying to run a project that was provided by a client.
I have the correct versions of Ruby, Gems, Rails, Bundler, Homebrew etc installed.
When I run rails server I get the following error in terminal.
.rvm/gems/ruby-2.2.2/gems/airbrake-ruby-1.0.4/lib/airbrake-ruby.rb:288:in `call_notifier': the 'default' notifier isn't configured (Airbrake::Error)
After much time spent on Google I couldn't find a fix on this.
Here is a screenshot of the whole terminal error message which I get the feeling these other lines could be related.
It looks like a previous developer may have hardcoded a commit hook in the application, pointing to a file in their local .git folder (and which you don't have).
I'd recommend either asking the developer to provide the missing file, create a dummy file in the same place, or removing that line.
I created a new Rails project in a directory, say Desktop (rails new project1). After that, I ran the following command:
rails server
Then, the project1 was running on localhost.
After that, I made another directory with name (project1) in another location. I copied all the files from the previous location to new location. After that, when I ran the following command:
rails server
I got the following error message:
Rails is not currently installed on this system.
But it is working in the previous directory. How do I solve this?
If you are totally new to Rails development and System administration it is rather complicated in the beginning. I recommend any kind of Rails tutorial to you for examply by Michael Hartl .
As Graeme McLean points out you somewhen understand that there is information about your environment needed to help you.
Most likely the requirements you need to be set up are not set up in the place you did copy your rails project as Pavan and Thaha kp pointed out.
My rails server is always crashing (Ruby console)
I am using windows 7 and I dont get any error in the console. Just an windows error telling my the ruby console how stop working.
Will be great if you add more information about version of Ruby you're using (ruby -v), Version of Rails (saying version 3 is not enough) and any more specific on your settings, like if you're using a MySQL database and how you're connecting to it.
So far, I can point you the the following resources:
Incorrect usage of MySQL library (libmysql.dll) can result in random crashes of Ruby/Rails. See manual installation and compilation steps here
There is a known issue with Ruby 1.9.2 that make it crash on concurrent/multiple threads, reported in Ruby bug tracker #3840. It was not solved in 1.9.2-p290 but is part of Ruby 1.9.3 (due to release in August)
Again, those are the two thing that I can think of based on the scarce information you provided. Please update your question with more details (the development.log file inside log directory should contain something) or even the output that is displayed prior the crash in the console.
I would strongly suggest checking Windows event log and/or ROR logs. Also, what version of ROR are you running?