Where can I find the list of different application frameworks created from the Rails 'generate' command?
I'm not sure entirely what you mean by 'application framework' but you can see the entire list of generators available in your current environment by running rails g -h. (Or rails generate --help if you're not into the whole brevity thing.)
Related
i've made a plugin for redmine, with 2 services.
But, on my remote-machine, the services seems not to be loaded.
Do services in redmine-plugins work in general?
Do i have to set any autoload-paths?
Is there a version-difference, in Redmine?
On my local Macbook, within redmine-4.0.4 all works fine (env: production and development). But on my Debian, there is redmine-3.4.2 i receipt this error
NameError (uninitialized constant TimesController::SearchTimes):
plugins/billing/app/controllers/times_controller.rb:41:in `select'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Services are just Ruby objects so they surely work in Redmine plugins.
Redmine autoloads only controllers, helpers and models paths under the plugin's /app directory. Plugin starting point /init.rb should manually require other files which usually resides in /lib folder.
Redmine 3.x and 4.x versions are very different, but much of these changes are caused by Rails itself.
I have a CIO Blumix Cloud Foundry PHP app developed that needs some additional components.
I used https://github.com/cloudfoundry/php-buildpack for the build. I read in its documentation that I can add my own extension. I did that and added a tar.tgz and added instructions in the extention.py how to install it.
The target location is: /home/vcap/.
I see the installation running okay, and I see the folder during deploy stage (in DevOps Pipelines deployment stage log&history).
But when deployment passes and I read with a deployed php page the folder, I see that it is not there. I read "container destroyed successfully" message in the log of the deploy. Maybe the whole installation environment goes destroyed? Where is a safe place in the deployment file structure where I can install components so they remain after the deployment passes?
I'm using the def compile(install): to place my unix commands. Example: os.system('ls') to list the installation folders content. They work properly.
Thx in advance!
There are two totally different environments used by your app: staging and runtime. Staging is where the buildpack runs & runtime is where the product of staging (i.e. your app) is run.
Unfortunately, paths are not the same in staging and runtime. At runtime your app lives under /app or /home/vcap/app (the former is a symlink to the latter). Staging is different. There is a /home/vcap directory but it's not used for anything.
Instead, the buildpack scripts are fed paths to use via cli arguments. This is all documented here.
As a PHP buildpack extension, you can access the cli args, and many other things, by looking at the context that is maintained by the buildpack. This gets passed directly into the buildpack extension methods like service_environment & service_commands. The compile buildpack extension method is slightly different as the argument passed in is not the content, but that argument does have a reference to the context (it's install.builder._ctx).
Having said all that, I would not recommend using PHP buildpack extensions at this point. The buildpack is being rewritten and that functionality is being dropped. It's not going to have a direct replacement, but the closest thing would be Composer's ability to execute scripts. My suggestion would be to see if you can use the Composer functionality. It'll be more portable as it won't depend on buildpack specific behavior.
The documentation for the ember-cli-code-coverage project on Github does not clearly state how exactly to configure and run coverage reports.
The documentation hints that, after installing the addon, you just need to set an environment variable named COVERAGE to true. I interpret that to mean an environment variable in config/environment.js. After running the CLI command ember test I expect to find something saved in a coverage folder at the root of the project, but nothing appears to be generated. My tests run okay without any errors, and with all passing tests.
There are a few statements on Stackoverflow (here, here, and here) that suggest the package works okay. Searching for clear examples or how-to articles appears to be a dead end at the present moment.
I'm trying to get this working using versions:
Ember.js 2.6.0
ember-cli-code-coverage 0.2.2
Windows 10
You need to set the environment variable in the command line environment, not the Ember environment. Run COVERAGE=true ember test.
Side-note: this does seem like a weird choice, requiring a command line environment variable instead of making it configurable in other ways the way ember-cli-blanket does.
I'm new to Rails and wish to deploy my app to Ubuntu 14 using Capistrano. Can someone explain to me what are binstubs and whether they are required for deploying my rails app?
A binstub is an executable script that wraps a Ruby command to ensure that a specific version of that command is used.
The reason binstubs are sometimes necessary is because a given named Ruby command can refer to many different things, and so you can't be 100% sure of what the name refers to. In deployment, predictability is very important: you want to be 100% sure of what code you are running, especially in production.
For example, consider the command named rails. You might have multiple versions of Rails installed. Indeed, every time you upgrade to the latest patch release for security fixes, that is another new version you're installing. On top of that, you might have multiple versions of Ruby installed, too.
So when you run the command rails, which version of Ruby is used? Which version of Rails?
A binstub makes this decision explicit. The idea is that you create a special script and place it in the bin directory of your project, say bin/rails. This script uses Bundler to guarantee the right version of Rails is used. When you run bin/rails, you get that guarantee. (When you generate a new Rails project, Rails in fact creates this and other binstubs for you.)
Anyway, technically you do not need these binstubs so long as you use bundle exec rails. The bundle exec wrapper essentially does the same thing that a binstub would do.
If you use the capistrano/rails gem in combination with the capistrano/bundler gem (make sure both are in your Capfile), then Capistrano will always use bundle exec and you won't have to worry about creating your own binstubs.
I want be able to build a native app, but without minifying the JS so I can debug it later confortably.
Currently I'm executing:
sencha app build native
How can I be able to build without minifying JS files?
Thanks
For native build, you can only have testing option after upgrade to Sencha CMD 5.x, refer to
http://docs.sencha.com/cmd/5.x/cmd_upgrade_guide.html
Under Cordova / PhoneGap
"These build profiles ensure that all of the “sencha app build” command variations are equivalent to previous releases. You will notice, however, that “native” is now a build profile instead of an environment (like “testing” or “production”). This means you can now do “sencha app build native testing” which was previously not possible."
So, the command should be
sencha app build native testing
You need to use this command line instead:
sencha app build testing
That way, all JavaScript source files are bundled but not minified; and you could debug easily.
See Sencha CMD 4 documentation for more details.